(1) باب إِذَا أُحْصِرَ الْمُعْتَمِرُ
Narrated Nafi`:
That Ubaidullah bin `Abdullah and Salim bin `Abdullah informed him that they told Ibn `Umar when Ibn Az-Zubair was attacked by the army, saying "There is no harm for you if you did not perform Hajj this year. We are afraid that you may be prevented from reaching the Ka`ba." Ibn `Umar said "We set out with Allah's Messenger (ﷺ) and the non-believers of Quraish prevented us from reaching the Ka`ba, and so the Prophet (ﷺ) slaughtered his Hadi and got his head shaved." Ibn `Umar added, "I make you witnesses that I have made `Umra obligatory for me. And, Allah willing, I will go and then if the way to Ka`ba is clear, I will perform the Tawaf, but if I am prevented from going to the Ka`ba then I will do the same as the Prophet (ﷺ) did while I was in his company." Ibn `Umar then assumed Ihram for Umra from Dhul-Hulaifa and proceeded for a while and said, "The conditions of `Umra and Hajj are similar and I make you witnesses that I have made `Umra and Hajj obligatory for myself." So, he did not finish the Ihram till the day of Nahr (slaughtering) came, and he slaughtered his Hadi. He used to say, "I will not finish the Ihram till I perform the Tawaf, one Tawaf on the day of entering Mecca (i.e. of Safa and Marwa for both `Umra and Hajj).
Reference: Sahih al-Bukhari 1807
In-book reference: Book 27, Hadith 2
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 28, Hadith 34