When the Messenger of Allah ﷺ was nearing death, there were some men in the house. The Prophet ﷺ said, "Come, let me write for you a document after which you will never go astray."Some of them said, "The Messenger of Allah ﷺ is overcome by pain, and you have the Quran. The Book of Allah is sufficient for us."The people in the house disagreed and began to argue. Some said, "Bring something so he can write for you a document after which you will never go astray." Others said otherwise.When their idle talk and disagreement grew excessive, the Messenger of Allah ﷺ said, "Get up and leave."Ubaydullah said that Ibn Abbas used to say, "The real calamity, the greatest calamity, was what came between the Messenger of Allah ﷺ and his writing that document for them, because of their disagreement and clamor."
لما حضر رسول الله ﷺ، وفي البيت رجال، فقال النبي ﷺ: هلموا أكتب لكم كتابا لا تضلوا بعده. فقال بعضهم: إن رسول الله ﷺ قد غلبه الوجع، وعندكم القرآن، حسبنا كتاب الله، فاختلف أهل البيت، واختصموا، فمنهم من يقول: قربوا يكتب لكم كتابا لا تضلوا بعده. ومنهم من يقول غير ذلك. فلما أكثروا اللغو والاختلاف قال رسول الله ﷺ: قوموا. قال عبيد الله: فكان يقول ابن عباس: إن الرزية كل الرزية ما حال بين رسول الله ﷺ وبين أن يكتب لهم ذلك الكتاب لاختلافهم ولغطهم.
Bukhari narrated it in Maghazi (4432), and Muslim in Wasiyya (1637:22), both from the hadith of Abdul-Razzaq, who said, Mamar informed us, from Zuhri, from Ubaydullah bin Abdullah bin Utba, from Ibn Abbas, and he mentioned it, with the wording being Bukhari's.In Muslim's version it reads, "Among them was Umar bin Khattab, who said, 'The Messenger of Allah ﷺ has been overcome by pain, and you have the Quran with you, the Book of Allah is sufficient for us.'"Umar's statement, "The Book of Allah is sufficient for us," was a response to those who were disputing with the Messenger of Allah ﷺ, not a rejection of the Messenger of Allah's ﷺ instruction.Its meaning is that the Book of Allah encompasses all the foundations of Islam, as Allah the Exalted says, "We have not neglected anything in the Book" [Anam 6:38], while his sunnah is an explanation and elaboration of these foundations. So his statement, "The Book of Allah is sufficient for us," means the Book together with its explanation and elaboration.For the Book of Allah is in greater need of the sunnah than the sunnah is in need of the Book, in order to know what is meant by the Book of Allah.