Sunan an-Nasa'i 1966
It was narrated that 'Umar bin Al-Khattab said:
"When 'Abdullah bin Ubayy bin Soul died, the Messenger of Allah was called upon to offer the funeral prayer for him. When the Messenger of Allah stood up (to offer the prayer), I got up quickly and said: 'O Messenger of Allah Are you going to pray for Ibn Ubayy when he said such-and-such an occasion?' And I stated to list all the things that he had said. The Messenger of Allah smiled and said: 'Leave me alone, O 'Umar.' When I spoke too much he said: 'I have been given the choice and I have chosen (to offer the prayer for him). If I knew that he could be forgiven by asking Allah's forgiveness more than seventy times, I would have done so.' The Messenger of Allah offered the funeral prayer for him, and then left. A short while later, the two Verses form surah Bara were revealed: 'And never pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly they disbelieved in Allah and His Messenger, and died while they were rebellious.' Later I was astonished by my audacity toward the Messenger of Allah on that day. And Allah and His Messenger know best."
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ الْمُبَارَكِ، قَالَ حَدَّثَنَا حُجَيْنُ بْنُ الْمُثَنَّى، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ، عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ، عَنْ عُمَرَ بْنِ الْخَطَّابِ، قَالَ لَمَّا مَاتَ عَبْدُ اللَّهِ بْنُ أُبَىِّ ابْنِ سَلُولَ دُعِي لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم لِيُصَلِّيَ عَلَيْهِ فَلَمَّا قَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَثَبْتُ إِلَيْهِ فَقُلْتُ يَا رَسُولَ اللَّهِ تُصَلِّي عَلَى ابْنِ أُبَىٍّ وَقَدْ قَالَ يَوْمَ كَذَا وَكَذَا كَذَا وَكَذَا أُعَدِّدُ عَلَيْهِ فَتَبَسَّمَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَقَالَ ‏"‏ أَخِّرْ عَنِّي يَا عُمَرُ ‏"‏ ‏.‏ فَلَمَّا أَكْثَرْتُ عَلَيْهِ قَالَ ‏"‏ إِنِّي قَدْ خُيِّرْتُ فَاخْتَرْتُ فَلَوْ عَلِمْتُ أَنِّي لَوْ زِدْتُ عَلَى السَّبْعِينَ غُفِرَ لَهُ لَزِدْتُ عَلَيْهَا ‏"‏ ‏.‏ فَصَلَّى عَلَيْهِ رَسُولُ اللَّهِ صلى الله عليه وسلم ثُمَّ انْصَرَفَ فَلَمْ يَمْكُثْ إِلاَّ يَسِيرًا حَتَّى نَزَلَتِ الآيَتَانِ مِنْ بَرَاءَةَ ‏{‏ وَلاَ تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا وَلاَ تَقُمْ عَلَى قَبْرِهِ إِنَّهُمْ كَفَرُوا بِاللَّهِ وَرَسُولِهِ وَمَاتُوا وَهُمْ فَاسِقُونَ ‏}‏ فَعَجِبْتُ بَعْدُ مِنْ جُرْأَتِي عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم يَوْمَئِذٍ وَاللَّهُ وَرَسُولُهُ أَعْلَمُ ‏.‏