عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ خَرَجَ مُعْتَمِرًا فَحَالَ كُفَّارُ قُرَيْشٍ بَيْنَهُ وَبَيْنَ الْبَيْتِ فَنَحَرَ هَدْيَهُ وَحَلَقَ رَأْسَهُ بِالْحُدَيْبِيَةِ فَصَالَحَهُمْ عَلَى أَنْ يَعْتَمِرُوا الْعَامَ الْمُقْبِلَ وَلَا يَحْمِلَ السِّلَاحَ عَلَيْهِمْ وَقَالَ سُرَيْجٌ وَلَا يَحْمِلَ سِلَاحًا إِلَّا سُيُوفًا وَلَا يُقِيمَ بِهَا إِلَّا مَا أَحَبُّوا فَاعْتَمَرَ مِنَ الْعَامِ الْمُقْبِلِ فَدَخَلَهَا كَمَا كَانَ صَالَحَهُمْ فَلَمَّا أَنْ أَقَامَ ثَلَاثًا أَمَرُوهُ أَنْ يَخْرُجَ فَخَرَجَ
It is narrated from Abdullah bin Umar (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) set out with the intention of performing Umrah, the disbelievers of Quraysh came between him and the House of Allah. There, at the place of Hudaybiyyah, he sacrificed his sacrificial camels, shaved his head, and made a treaty with them, in which it was agreed that he would come the following year to perform Umrah and would not take up arms against the Quraysh of Makkah. The Muslims would only have swords with them, and they would stay in Makkah only for as many days as the Quraysh permitted. Accordingly, the Messenger of Allah (peace and blessings be upon him) came the next year and performed Umrah. As per the agreement, the Messenger of Allah (peace and blessings be upon him) entered Makkah. When three days had passed, the Quraysh demanded that the Messenger of Allah (peace and blessings be upon him) depart, so he left from there.