Hadithcore
Sahih al-Bukhari, 2958
sahih

Narrated Ibn `Umar:

When we reached (Hudaibiya) in the next year (of the treaty of Hudaibiya), not even two men amongst us agreed unanimously as to which was the tree under which we had given the pledge of allegiance, and that was out of Allah's Mercy. (The sub narrator asked Naf'i, "For what did the Prophet (ﷺ) take their pledge of allegiance, was it for death?" Naf'i replied "No, but he took their pledge of allegiance for patience.")

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا جُوَيْرِيَةُ، عَنْ نَافِعٍ، قَالَ قَالَ ابْنُ عُمَرَ ـ رضى الله عنهما ـ رَجَعْنَا مِنَ الْعَامِ الْمُقْبِلِ فَمَا اجْتَمَعَ مِنَّا اثْنَانِ عَلَى الشَّجَرَةِ الَّتِي بَايَعْنَا تَحْتَهَا، كَانَتْ رَحْمَةً مِنَ اللَّهِ‏.‏ فَسَأَلْتُ نَافِعًا عَلَى أَىِّ شَىْءٍ بَايَعَهُمْ عَلَى الْمَوْتِ قَالَ لاَ، بَايَعَهُمْ عَلَى الصَّبْرِ‏.‏

References2 variants
In-Book Reference
Book 56, Hadith 169
USC-MSA web (English) reference
Vol. 4, Book 52, Hadith 205 (deprecated numbering scheme)
Sharh · explanationclick to expand
The Companions (may Allah be pleased with them) gave the Bay‘ah (i.e., pledge of allegiance) to the Prophet ﷺ in the year when Al-Hudaybiyah Treaty was concluded in 6 A.H., to hear and obey Allah, Exalted is He, and His Messenger ﷺ and not to flee from the battlefield. Quraysh denied the Muslims access to the Sacred House (to perform ‘Umrah), and the Prophet ﷺ concluded Al-Hudaybiyah Treaty with them, and one of its terms was that the Prophet ﷺ and his Companions (may Allah be pleased with them) must return to Al-Madeenah that year without performing ‘Umrah, on the condition that they may return to perform it the following year. In this hadeeth, ‘Abdullaah ibn ‘Umar (may Allah be pleased with them) narrated that when the Companions (may Allah be pleased with them) returned to Makkah in 7 A.H. to perform ‘Umrah the next year (after the treaty of Hudaybiyah), which was known as ‘Umrat Al-Qadaa’, they reached the place where they had given Bay‘ah (i.e., pledge of allegiance). They disagreed on the exact location of the tree under which they had given the Bay‘ah. Not even two men amongst them agreed unanimously as to which was the tree under which they had given the Bay‘ah. Perhaps this was a manifestation of Allah's Mercy, lest it would have been a source of Fitnah for some people, being a blessed place that witnessed a significant event (i.e., the Bay‘ah) and the descent of the divine pleasure and tranquility on the Companions (may Allah be pleased with them). Were the exact location of the tree to be identified and known to people, some ignorant people might have fallen into unprescribed reverence or worship of it. Therefore, the fact that its exact location remained hidden has been a source of mercy from Allah, Exalted is He. Joowayrirah ibn Asmaa’ asked Naafi‘, the freed slave of Ibn ‘Umar (may Allah be pleased with them), "For what did the Prophetﷺ take their pledge of allegiance, was it for death?" Naafi‘ replied that the Prophet ﷺ took their Bay‘ah for patience, and not for death in Allah’s Cause. It was narrated in other versions that the Prophet ﷺ took their Bay‘ah for death in Allah’s Cause, and for not fleeing from the battlefield in other versions. The term ‘patience’ incorporates all these meanings because giving the Bay‘ah for death in Allah’s Cause is the same as giving the Bay‘ah not to flee from the battlefield even if it meant their death, and this also entails patience, and therefore the term patience includes the rest of the meanings..