Muslims used to seek forgiveness for their dead relatives from polytheists under the pretext that Abraham sought forgiveness for his father until the Ayah was revealed to remove any doubt and ambiguity, then they ceased.
﴿وَمَا كَانَ اللّهُ لِيُضِلَّ قَوْماً بَعْدَ إِذْ هَدَاهُمْ حَتَّى يُبَيِّنَ لَهُم مَّا يَتَّقُونَ إِنَّ اللّهَ بِكُلِّ شَيْءٍ عَلِيمٌ﴾ (التوبة: 115)
115 - Allah would not have sentenced you with aberration after He had guided you to faith but after telling you of prohibited things to avoid. As for sentencing you with aberration before informing you, it would not happen because Allah is All-Knowing of everything including the actions you do and leave and your intentions.
﴿إِنَّ اللّهَ لَهُ مُلْكُ السَّمَاوَاتِ وَالأَرْضِ يُحْيِي وَيُمِيتُ وَمَا لَكُم مِّن دُونِ اللّهِ مِن وَلِيٍّ وَلاَ نَصِيرٍ﴾ (التوبة: 116)
116 - All that in heavens and on earth belong to Allah whether living, inanimate, or plants. He alone revives anything when He wills and causes things to die when He wills. So, do not fear your enemy, fight them, and be confident of victory, for no one shall provide you with victory except He and there is no Guardian and Keeper to you but He.
﴿لَقَد تَّابَ الله عَلَى النَّبِيِّ وَالْمُهَاجِرِينَ وَالأَنصَارِ الَّذِينَ اتَّبَعُوهُ فِي سَاعَةِ الْعُسْرَةِ مِن بَعْدِ مَا كَادَ يَزِيغُ قُلُوبُ فَرِيقٍ مِّنْهُمْ ثُمَّ تَابَ عَلَيْهِمْ إِنَّهُ بِهِمْ رَؤُوفٌ رَّحِيمٌ﴾ (التوبة: 117)
117 - Allah (Glory be to Him) forgave the sins of the Companions from the Muhajireen (Migrants) and Ansar (Helpers), and the Messenger (peace be upon him) was mentioned among them as an honor and exaltation to their status. Those Companions participated in the battle of Tabuk in the time of adversity until some of them were about to lag behind Jihad because of the hardship and difficulty they faced, however Allah protected them, made them firm, and forgave them. Indeed, Allah (Glory be to Him) had been Merciful with them because He granted them repentance and had been Merciful with them because He accepted their repentance.
The Companions set out to the battle of Tabuk in year of drought and severe heat despite their lack of provision and water to the extent that two men would split a date to eat. Therefore, Allah showed mercy to them and returned them safe from the battle.
﴿وَعَلَى الثَّلاَثَةِ الَّذِينَ خُلِّفُوا حَتَّى إِذَا ضَاقَتْ عَلَيْهِمُ الأَرْضُ بِمَا رَحُبَتْ وَضَاقَتْ عَلَيْهِمْ أَنفُسُهُمْ وَظَنُّوا أَن لاَّ مَلْجَأَ مِنَ اللّهِ إِلاَّ إِلَيْهِ ثُمَّ تَابَ عَلَيْهِمْ لِيَتُوبُوا إِنَّ اللّهَ هُوَ التَّوَّابُ الرَّحِيمُ﴾ (التوبة: 118)
118 - Allah forgave the three Companions who lagged behind the battle out of laziness not hypocrisy after they had repented to Him. The revelation about accepting their repentance was delayed although the repentance of the people who tied themselves around the masjid's poles was accepted so that Allah would give them time to repent sincerely. The Messenger of Allah (peace be upon him) commanded Muslims to keep away from them and not to sit or talk with them. Their repentance was delayed until the earth was so tight for them, their hearts could not stand blame, and their selves were filled with sadness and sorrow. They did not know what to do then they knew that there was no shelter for them but in