(71) باب مَنْ صَلَّى رَكْعَتَىِ الطَّوَافِ خَارِجًا مِنَ الْمَسْجِدِ
Narrated Um Salama:
(the wife of the Prophet) I informed Allah's Messenger (ﷺ) (about my illness). (Through other sub-narrators, Um Salama narrated that when Allah's Messenger (ﷺ) was at Mecca and had just decided to leave (Mecca) while she had not yet done Tawaf of the Ka`ba (and after listening to her). The Prophet (ﷺ) said, "When the morning prayer is established, perform the Tawaf on your camel while the people are in prayer." So she did the same and did not offer the two rak`at of Tawaf until she came out of the Mosque.
Reference: Sahih al-Bukhari 1626
In-book reference: Book 25, Hadith 110
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 26, Hadith 692
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.