Abu Saeed Khudri reported,

The Messenger of Allah ﷺ performed itikaf during the middle ten days of Ramadan, seeking Laylat al-Qadr before it had been made clear to him. When those days had passed, he ordered that his tent be taken down. Then it was made clear to him that it falls within the last ten nights, so he ordered the tent to be set up again. He then came out to the people and said, "People, Laylat al-Qadr had been made known to me, and I came out to tell you about it. But two men came disputing with one another, and the Shaytan was with them, so I forgot it. Seek it in the last ten nights of Ramadan. Seek it on the ninth, the seventh, and the fifth."I said, "Abu Saeed, you know the count better than we do."He replied, "Yes, we are more entitled to that than you."I asked, "What are the ninth, the seventh, and the fifth?"He said, "When twenty-one nights have passed, the one that follows, the twenty-second, is the ninth. When twenty-three have passed, the one that follows is the seventh. When twenty-five have passed, the one that follows is the fifth."Ibn Khallad said "disputing" in place of "quarreling."

Muslim 2774

Sahih

حدثنا محمد بن المثنى وأبو بكر بن خلاد قالا حدثنا عبد الأعلى حدثنا سعيد عن أبي نضرة

عن أبي سعيد الخدري رضي الله عنه قال

اعتكف رسول الله ﷺ العشر الأوسط من رمضان يلتمس ليلة القدر قبل أن تبان له فلما انقضين أمر بالبناء فقوض ثم أبينت له أنها في العشر الأواخر فأمر بالبناء فأعيد ثم خرج على الناس فقال يا أيها الناس إنها كانت أبينت لي ليلة القدر وإني خرجت لأخبركم بها فجاء رجلان يحتقان معهما الشيطان فنسيتها فالتمسوها في العشر الأواخر من رمضان التمسوها في التاسعة والسابعة والخامسة قال قلت يا أبا سعيد إنكم أعلم بالعدد منا قال أجل نحن أحق بذلك منكم قال قلت ما التاسعة والسابعة والخامسة قال إذا مضت واحدة وعشرون فالتي تليها ثنتين وعشرين وهي التاسعة فإذا مضت ثلاث وعشرون فالتي تليها السابعة فإذا مضى خمس وعشرون فالتي تليها الخامسة وقال ابن خلاد مكان يحتقان يختصمان

مسلم 2774صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Fasting
Chapter
Virtue of Laylat al-Qadr, encouragement to seek it, its location, and the most likely times to seek it
Numbering
Darussalam 2774
Muslim 2774