عَنْ شُرَيْحِ بْنِ عُبَيْدٍ الْحَضْرَمِيِّ يَرُدُّهُ إِلَى أَبِي ذَرٍّ رَضِيَ اللَّهُ عَنْهُ أَنَّهُ قَالَ: لَمَّا كَانَ الْعَشْرُ الْأَوَاخِرُ اعْتَكَفَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فِي الْمَسْجِدِ فَلَمَّا صَلَّى النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ صَلَاةَ الْعَصْرِ مِنْ يَوْمِ اثْنَيْ عَشَرَ قَالَ: ((إِنَّا قَائِمُونَ اللَّيْلَةَ إِنْ شَاءَ اللَّهُ، فَمَنْ شَاءَ مِنْكُمْ أَنْ يَقُومَ فَلْيَقُمْ))، وَهِيَ لَيْلَةُ ثَلَاثٍ وَعَشَرَ، فَصَلَّاهَا النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ جَمَاعَةً بَعْدَ الْعَتَمَةِ حَتَّى ذَهَبَ ثُلُثُ اللَّيْلِ ثُمَّ انْصَرَفَ، فَلَمَّا كَانَ لَيْلَةُ أَرْبَعٍ وَعَشَرَ لَمْ يَقُلْ شَيْئًا وَلَمْ يَقُمْ، فَلَمَّا كَانَ لَيْلَةُ خَمْسٍ وَعَشَرَ قَامَ بَعْدَ صَلَاةِ الْعَصْرِ يَوْمَ أَرْبَعٍ وَعَشَرَ فَقَالَ: ((إِنَّا قَائِمُونَ اللَّيْلَةَ إِنْ شَاءَ اللَّهُ، يَعْنِي لَيْلَةَ خَمْسٍ وَعَشَرَ، فَمَنْ شَاءَ فَلْيَقُمْ))، فَصَلَّى بِالنَّاسِ حَتَّى ذَهَبَ ثُلُثُ اللَّيْلِ ثُمَّ انْصَرَفَ، فَلَمَّا كَانَ لَيْلَةُ سِتٍّ وَعَشَرَ لَمْ يَقُلْ شَيْئًا وَلَمْ يَقُمْ، فَلَمَّا كَانَ عِنْدَ صَلَاةِ الْعَصْرِ مِنْ يَوْمِ سِتٍّ وَعَشَرَ قَامَ فَقَالَ: ((إِنَّا قَائِمُونَ إِنْ شَاءَ اللَّهُ يَعْنِي لَيْلَةَ سَبْعٍ وَعَشَرَ فَمَنْ شَاءَ أَنْ يَقُومَ فَلْيَقُمْ))، قَالَ أَبُو ذَرٍّ: فَتَجَلَّدْنَا لِلْقِيَامِ فَصَلَّى بِنَا النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ حَتَّى ذَهَبَ ثُلُثَا اللَّيْلِ ثُمَّ انْصَرَفَ إِلَى قُبَّتِهِ فِي الْمَسْجِدِ فَقُلْتُ لَهُ: إِنْ كُنَّا لَقَدْ طَمِعْنَا يَا رَسُولَ اللَّهِ! أَنْ تَقُومَ بِنَا حَتَّى تُصْبِحَ، فَقَالَ: ((يَا أَبَا ذَرٍّ! إِنَّكَ إِذَا صَلَّيْتَ مَعَ إِمَامِكَ وَانْصَرَفْتَ إِذَا انْصَرَفَ كُتِبَ لَكَ قُنُوتُ لَيْلَتِكَ))، قَالَ أَبُو عَبْدِ الرَّحْمَنِ وَجَدْتُّ هَٰذَا الْحَدِيثَ فِي كِتَابِ أَبِي بِخَطِّ يَدِهِ
It is narrated from Shurayh bin Ubaid Hadrami that Sayyiduna Abu Dharr Ghifari (may Allah be pleased with him) stated that the Noble Prophet (peace and blessings be upon him) performed i'tikaf in the mosque during the last ten days of Ramadan. When he (peace and blessings be upon him) offered the Asr prayer on the twenty-second day, he said: "Tonight, insha’Allah, we will stand (in prayer), so whoever among you wishes to stand, let him do so." This was the twenty-third night. Thus, the Noble Prophet (peace and blessings be upon him) led the ‘Isha prayer in congregation after darkness had fallen, until a third of the night had passed, then he (peace and blessings be upon him) went (to his tent). When the twenty-fourth night came, he (peace and blessings be upon him) neither stood (in prayer) nor said anything. But when the twenty-fifth night was to come, he (peace and blessings be upon him) stood after Asr on the twenty-fourth day of Ramadan and said: "Tonight, insha’Allah, we will stand (in prayer), so whoever among you wishes to stand, let him do so." So he (peace and blessings be upon him) stood in prayer that night until a third of the night had passed, then he (peace and blessings be upon him) went (to his tent). On the twenty-sixth night, he (peace and blessings be upon him) neither stood (in prayer) nor said anything. When he (peace and blessings be upon him) offered the Asr prayer on the twenty-sixth day, he (peace and blessings be upon him) stood and said: "Tonight, insha’Allah, we will stand (in prayer), so whoever wishes to stand, let him do so." Sayyiduna Abu Dharr Ghifari (may Allah be pleased with him) says: So we showed patience and steadfastness in standing (for prayer). The Noble Prophet (peace and blessings be upon him) led us in prayer until two-thirds of the night had passed, then he (peace and blessings be upon him) went to his chamber. I said: "O Messenger of Allah! We are eager that you lead us in prayer until morning." But he (peace and blessings be upon him) said: "O Abu Dharr! When you pray with the Imam and return at the time when the Imam returns, it will be written for you as if you stood (in prayer) for the whole night." Abu Abdur Rahman says: I found this hadith written in my father’s (Imam Ahmad’s) book in his own handwriting.