[Machine] The Messenger of Allah ﷺ performed Itikaf during the middle ten days of Ramadan, seeking Laylat al-Qadr (the Night of Decree) before it was revealed to him. When those ten days were complete, he commanded for a structure to be built, and it was built but then collapsed. Then it was revealed to him that Laylat al-Qadr was in the last ten days, so he commanded for it to be rebuilt. He then performed Itikaf during the last ten days, and then he emerged to address the people. He said, "O people, it has been revealed to me that Laylat al-Qadr was made known to me, but two feeble men with the devil made me forget it. So seek it in the ninth, seventh, and fifth nights." I (Abu Sa'id) said, "Indeed, you know the number of us better." He replied, "I am more entitled to do that than you. So leave aside the twenty-first night, and the ninth night follows it, and leave aside the twenty-third night, and the seventh night follows it, and leave aside the twenty-fifth night, and the fifth night follows it."
اعْتَكَفَ رَسُولُ اللهِ ﷺ الْعَشْرَ الْأَوْسَطَ مِنْ رَمَضَانَ وَهُوَ يَلْتَمِسُ لَيْلَةَ الْقَدْرِ قَبْلَ أَنْ تُبَانَ لَهُ فَلَمَّا تَقَضَّيْنَ أَمَرَ بِبُنْيَانِهِ فَنُقِضَ ثُمَّ أُبِينَتْ لَهُ أَنَّهَا فِي الْعَشْرِ الْأَوَاخِرِفَأَمَرَ بِالْبِنَاءِ فَأُعِيدَ ثُمَّ اعْتَكَفَ الْعَشْرَ الْأَوَاخِرَ ثُمَّ خَرَجَ عَلَى النَّاسِ فَقَالَ يَا أَيُّهَا النَّاسُ إِنَّهَا أُبِينَتْ لِي لَيْلَةُ الْقَدْرِ فَخَرَجْتُ لِأُخْبِرَكُمْ بِهَا فَجَاءَ رَجُلَانِ يَحِيفَانِ مَعَهُمَا الشَّيْطَانُ فَنُسِّيتُهَا فَالْتَمِسُوهَا فِي التَّاسِعَةِ وَالسَّابِعَةِ وَالْخَامِسَةِ فَقُلْتُ يَا أَبَا سَعِيدٍ إِنَّكُمْ أَعْلَمُ بِالْعَدَدِ مِنَّا قَالَ أَنَا أَحَقُّ بِذَاكَ مِنْكُمْ فَمَا التَّاسِعَةُ وَالسَّابِعَةُ وَالْخَامِسَةُ؟ قَالَ تَدَعُ الَّتِي تَدْعُونَ إِحْدَى وَعِشْرِينَ وَالَّتِي تَلِيهَا التَّاسِعَةُ وَتَدَعُ الَّتِي تَدْعُونَ ثَلَاثَةً وَعِشْرِينَ وَالَّتِي تَلِيهَا السَّابِعَةُ وَتَدَعُ الَّتِي تَدْعُونَ خَمْسَةً وَعِشْرِينَ وَالَّتِي تَلِيهَا الْخَامِسَةُ