Praise be to Allah.
If believers die believing in Allah but having committed sins less than major shirk that puts a person beyond the pale of Islam, one of two scenarios may apply:
1 – They repentezd from those sins during their lives. If they repented sincerely, Allah will accept that from them, and they will once again become like those who did not commit any sin, and they will not be punished for their sins in the Hereafter. Indeed, their Lord may honour them and turn their bad deeds (sayi’aat) into good deeds (hasanaat).
2 – Those who die without having repented from their sins, or whose repentance was imperfect and did not meet the required conditions, or their repentance was not accepted. What is proven in the verses of the Qur’aan and the Sunnah of the Prophet, and on which the righteous salaf was agreed is that these – the sinners among those who believe in Tawheed (the oneness of Allah) – fall into three categories:
The first category: People who have many hasanaat (good deeds) to their credit, which outweigh these sayi’aat (bad deeds). Allah will forgive them for their bad deeds and admit them to Paradise. The Fire will never touch them, as a kindness and blessing from Allah. According to a hadeeth narrated by Ibn ‘Umar (may Allah be pleased with him), the Prophet (peace and blessings of Allah be upon him) said: “Allah will bring the believer close and will shelter him with His screen, then He will say, ‘Do you remember such and such a sin? Do you remember such and such a sin?’ and he will say, ‘Yes, O Lord,’ until He makes him confess his sins and he thinks that he is doomed. Then [Allah] will say, ‘I concealed it for you in the world and I forgive you for it today.’ Then he will be given the book of his good deeds (hasanaat). But as for the kaafir and the hypocrite, the witnesses will say, ‘These are the ones who lied against their Lord!’ No doubt! the curse of Allah is upon the zaalimoon (wrongdoers) [cf. Hood 11:18].’” (Narrated by al-Bukhaari, 2441; Muslim, 2768).
The second category: people whose hasanaat and sayi’aat are equal, so their sayi’aat are enough to keep them away from Paradise, but their hasanaat are enough to save them from Hell. These are the people of al-A’raaf (a wall with elevated places) whom Allah says will stand between Paradise and Hell as long as Allah wills, then they will be granted permission to enter Paradise, as Allah says after telling us of the entrance of the people of Paradise to Paradise and the people of Hell to Hell.
The third category: People who will meet Allah persisting in committing major sins and acts of immorality, so their sayi’aat will outweigh their hasanaat. These are the ones who will deserve to enter Hell in a manner commensurate with their sins. Some of them will be seized by the Fire as far as their ankles, some up to mid-calf, some up to their knees, and for some only the mark of sujood will be spared. These are the ones whom Allah will permit to be brought forth from the Fire because of the intercession of the Prophet (peace and blessings of Allah be upon him). He, all the Prophets, the angels, the believers and whoever else Allah wishes to honour will intercede for them. Whoever among these sinners has more faith and committed less sins will have a lighter punishment and remain in Hell for a shorter period and will be brought forth sooner. Those whose sins were greater and whose faith was weaker, will have a greater punishment and will remain for longer.
With regard to this world, so long as they do not do anything that would put them beyond the pale of Islam, then they are believers whose faith is lacking, as the righteous salaf agreed, basing that on the verses of the Qur’aan and the ahaadeeth of the Prophet.
So Allah described each of the fighting parties as believers, even though fighting is a major sin. Indeed, He described the ones who reconcile between them as being their brothers, which indicates that the one who commits a major sin which does not reach the degree of shirk and kufr is still regarded as a believer and comes under the rulings on believers, but he is lacking in faith. In this way the shar’i texts may be reconciled and support one another. And Allah knows best.