ومن اغتسل أول الليل ثم أحرم آخر الليل أجزأه غسله.
If a person performs ghusl at the beginning of the night and assumes ihram at the end of the night, the initial ghusl suffices.