Ayesha reported,

The Messenger of Allah ﷺ would sometimes be overtaken by dawn during Ramadan while in a state of major ritual impurity not caused by a wet dream, and he would then perform the ritual bath and fast.

Muslim 2590

Sahih

و حدثني حرملة بن يحيى أخبرنا ابن وهب أخبرني يونس عن ابن شهاب عن عروة بن الزبير وأبي بكر بن عبد الرحمن أن

عائشة زوج النبي ﷺ قالت

قد كان رسول الله ﷺ يدركه الفجر في رمضان وهو جنب من غير حلم فيغتسل ويصوم

مسلم 2590صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Fasting
Chapter
Validity of fasting for one upon whom Fajr rises while he is in a state of major ritual impurity
Numbering
Darussalam 2590
Muslim 2590