When `Abdullah bin Ubai bin Salul died, Allah's Messenger (ﷺ) was called in order to offer the funeral
prayer for him. When Allah's Messenger (ﷺ) got up (to offer the prayer) I jumped towards him and said, "O
Allah's Messenger (ﷺ)! Do you offer the prayer for Ibn Ubai although he said so-and-so on such-and-such-a
day?" I went on mentioning his sayings. Allah's Messenger (ﷺ) smiled and said, "Keep away from me, O
`Umar!" But when I spoke too much to him, he said, "I have been given the choice, and I have chosen
(this) ; and if I knew that if I asked forgiveness for him more than seventy times, he would be for
given, I would ask it for more times than that." So Allah's Messenger (ﷺ) offered the funeral prayer for him
and then left, but he did not stay long before the two Verses of Surat-Bara'a were revealed, i.e.:-- 'And
never (O Muhammad) pray for anyone of them that dies.... and died in a state of rebellion.' (9.84)
Later I was astonished at my daring to speak like that to Allah's Messenger (ﷺ) and Allah and His Apostle
know best.
Sahih al-Bukhari Book 65, Hadith 193
"Whoever would like to meet Allah tomorrow as a Muslim, let him regularly attend these five (daily) prayers whenever the call for them is given (that in the mosques), for Allah prescribed for
His Prophet the ways of guidance, and they (the prayers) are part of those ways of guidance. I do not think that there is anyone among you who does not have a place where he prays in his house. But if you were to pray in your houses and forsake the Masjids, you would be forsaking the Sunnah of your Prophet, and if you were to forsake the Sunnah of your
Prophet you would go astray. There is no Muslim slave who performs Wudu and does it well, then walks to the prayer, but Allah will record one Hasanah (good
deed) for each step he takes, or raise' him one level by it or erase one sin from him. I remember how we used to take short steps, and I remember (a time) when no one stayed behind from the prayer except
a hypocrite whose hypocrisy was well known. And I have seen a man coming Supported by two others until he would be made to stand in the row."
Sunan an-Nasa'i Book 10, Hadith 73