Doing Ghusl by Immersion While Fasting
Issue No. 1370- If a person forgets that he is fasting, and immerses his head in water with the intention of performing ghusl, both the fast and ghusl will be valid. However, if he knows that it is a specific obligatory fast [1] and intentionally does so, he should, as an obligatory precaution, offer the qaḍā of the fast and also perform ghusl again.