عَنْ نَافِعٍ قَالَ: إِنَّ ابْنَ عُمَرَ كَانَ لَا يَقْدَمُ مَكَّةَ إِلَّا بَاتَ بِذِي طُوًى حَتَّى يُصْبِحَ وَيَغْتَسِلَ وَيُصَلِّيَ فَيَدْخُلَ مَكَّةَ نَهَارًا وَإِذَا نَفَرَ مِنْهَا مَرَّ بِذِي طُوًى وَبَاتَ بِهَا حَتَّى يُصْبِحَ وَيَذْكُرُ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يَفْعَلُ ذَلِكَ
Translation
‘A’isha said

We went out with the Prophet mentioning nothing but the hajj, and when we were at Sarif (A place near at-Tan'im) I began to menstruate. The Prophet came in and finding me weeping, he said, “Perhaps you are menstruating.” When I replied that I was, he said, “That is something which God has decreed for the daughters of Adam; but do what the pilgrims do, with the exception of going round the House, till you are purified.” Bukhari and Muslim.