كتاب الحج
15  
The Book of Pilgrimage
(26)
Chapter: It is permissible to exit Ihram if one is prevented from completing Hajj; It is permissible to perform Qiran and the pilgrim performing Qiran should perform just one Tawaf and one Sa'i
(26)
باب بَيَانِ جَوَازِ التَّحَلُّلِ بِالإِحْصَارِ وَجَوَازِ الْقِرَانِ ‏
Sahih Muslim 1230 b

Nafi' reported that 'Abdullah b. 'Abdullah and Salim b. Abdullah said to 'Abdullah (b. 'Umar) at the time when Hajjaj came to fight against Ibn Zubair:

There would be no harm if you do not (proceed) for Hajj this year, for we fear that there would be fight among people which would cause obstruction between you and the House, whereupon he said: If there would be obstruction between me and that (Ka'ba), I would do as Allah's Messenger (ﷺ) did. I was with him (the Holy Prophet) when the infidels of Quraish caused obstructions between him (the Holy Prophet) and the House. I call you as my witness (to the fact) that I have made 'Umra essential for me. He proceeded until he came to Dhu'l-Hulaifa and pronounced Talbiya for Umra, and said: If the way Is clear forme, I would then complete my 'Umra but If there is some obstruction between me and that (the Ka'ba). I would then do what Allah's Messenger (ﷺ) had done (at the occasion of Hudaibiya), and I was with him (the Holy Prophet). and then recited:" Verily in the Messenger of Allah, there is a model pattern for you" (xxxiii. 21). He then moved on until he came to the rear side of al-Baida' and said: There is one command for both of them automatically) (Hajj and Umra). If I am detained (in the performance) of 'Umra, I am ( automatically detained (in the performance) of Hajj (too). I call you as witness that Hajj along with 'Umra I had made essential for me. (I am performing Hajj and 'Umra as Qiran.) He then bought sacrificial animals at Qudaid and then circumambulated the House and ran between al-Safa' and al-Marwa once (covering both Hajj and Umra), and did not put off Ihram until on the Day of Sacrifice in the month of Dhu'l-Hijja.
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا يَحْيَى، - وَهُوَ الْقَطَّانُ - عَنْ عُبَيْدِ اللَّهِ، حَدَّثَنِي نَافِعٌ، أَنَّ عَبْدَ اللَّهِ بْنَ عَبْدِ اللَّهِ، وَسَالِمَ بْنَ عَبْدِ اللَّهِ، كَلَّمَا عَبْدَ اللَّهِ حِينَ نَزَلَ الْحَجَّاجُ لِقِتَالِ ابْنِ الزُّبَيْرِ قَالاَ لاَ يَضُرُّكَ أَنْ لاَ تَحُجَّ الْعَامَ فَإِنَّا نَخْشَى أَنْ يَكُونَ بَيْنَ النَّاسِ قِتَالٌ يُحَالُ بَيْنَكَ وَبَيْنَ الْبَيْتِ قَالَ فَإِنْ حِيلَ بَيْنِي وَبَيْنَهُ فَعَلْتُ كَمَا فَعَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَأَنَا مَعَهُ حِينَ حَالَتْ كُفَّارُ قُرَيْشٍ بَيْنَهُ وَبَيْنَ الْبَيْتِ أُشْهِدُكُمْ أَنِّي قَدْ أَوْجَبْتُ عُمْرَةً ‏.‏ فَانْطَلَقَ حَتَّى أَتَى ذَا الْحُلَيْفَةِ فَلَبَّى بِالْعُمْرَةِ ثُمَّ قَالَ إِنْ خُلِّيَ سَبِيلِي قَضَيْتُ عُمْرَتِي وَإِنْ حِيلَ بَيْنِي وَبَيْنَهُ فَعَلْتُ كَمَا فَعَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَأَنَا مَعَهُ ‏.‏ ثُمَّ تَلاَ ‏{‏ لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ‏}‏ ثُمَّ سَارَ حَتَّى إِذَا كَانَ بِظَهْرِ الْبَيْدَاءِ قَالَ مَا أَمْرُهُمَا إِلاَّ وَاحِدٌ إِنْ حِيلَ بَيْنِي وَبَيْنَ الْعُمْرَةِ حِيلَ بَيْنِي وَبَيْنَ الْحَجِّ أُشْهِدُكُمْ أَنِّي قَدْ أَوْجَبْتُ حَجَّةً مَعَ عُمْرَةٍ ‏.‏ فَانْطَلَقَ حَتَّى ابْتَاعَ بِقُدَيْدٍ هَدْيًا ثُمَّ طَافَ لَهُمَا طَوَافًا وَاحِدًا بِالْبَيْتِ وَبَيْنَ الصَّفَا وَالْمَرْوَةِ ثُمَّ لَمْ يَحِلَّ مِنْهُمَا حَتَّى حَلَّ مِنْهُمَا بِحَجَّةٍ يَوْمَ النَّحْرِ ‏.‏
Reference : Sahih Muslim 1230b
In-book reference : Book 15, Hadith 198
USC-MSA web (English) reference : Book 7, Hadith 2839
  (deprecated numbering scheme)