Islamic scholars distinguish between resisting oppression, which the Qur'an permits and in some conditions commends, and targeting the innocent, which nearly all scholars forbid, and they judge an act by its conduct and not by the label that a government or a group attaches to it.
- The Qur'an permits those who have been wronged to fight (22:39), and urges the defence of the oppressed (4:75), and also forbids transgression (2:190) and says that to kill one soul unjustly is as if to kill all mankind (5:32).
- The Prophet (saw) forbade the killing of women and children (Sahih al-Bukhari and Sahih Muslim), and warned that whoever kills a person under a covenant will not smell the fragrance of Paradise (Sahih al-Bukhari).
- Terms such as 'extremist' and 'terrorist' are used in politics, and have been applied to violent groups and also to peaceful critics, so the label alone is no evidence of guilt or of justice.
- Scholars differ on resistance to occupation and on rebellion against rulers, and this answer sets out the main positions evenly.
Introduction
The question observes that the words 'extremist' and 'terrorist' are sometimes applied to people who have risen against oppression, and asks whether that is a fair description. It is a serious question, and the answer given by Islamic scholarship has two parts. The first is that oppression (zulm) is a grave wrong and resisting it is not itself extremism. The second is that the method of resistance is judged by the law, and that some acts are forbidden whatever the cause. A cause does not make an act lawful, and an act does not make a cause unjust.
The terms must first be defined. In Arabic, extremism is ghuluw (going beyond the limit) or tatarruf, and terror in the sense of frightening or attacking civilians is hiraba or irhab in the contemporary legal usage. The Qur'an warns against exceeding the limit in religion (4:171, 5:77), and the Prophet (saw) said: 'Ruined are those who go to extremes', and he repeated it three times (Sahih Muslim 2670). In contrast, in political usage in the West and elsewhere, there is no single agreed definition of 'terrorism', and states have applied the word in different ways.
The key verse on defensive fighting is this:
أُذِنَ لِلَّذِينَ يُقَاتَلُونَ بِأَنَّهُمْ ظُلِمُوا
"Permission is given to those who are fought, because they have been wronged." (22:39)
The right to resist oppression
The Qur'an condemns oppression repeatedly and tells believers to stand against it. It asks why believers do not fight for the oppressed men, women and children who cry out for deliverance (4:75). It also says that the blame lies against those who wrong people and transgress in the land (42:42). The Prophet (saw) said: 'Help your brother, whether he is the oppressor or the oppressed,' and when he was asked how to help the oppressor, he said: by restraining him from oppression (Sahih al-Bukhari, Book of Oppressions). He also said that the best form of jihad is a word of truth spoken to an unjust ruler (Sunan Abi Dawud, Jami' al-Tirmidhi, graded hasan, and graded sahih by al-Albani).
The jurists therefore recognise self-defence. If a land is invaded, the classical jurists, such as Ibn Qudama in al-Mughni and Ibn 'Abidin in the Hanafi tradition, held that defence becomes an individual duty on those who are able. In that sense, those who resist an occupying army are not described as extremists by the scholars, and this is the position of mainstream scholars such as those of al-Azhar and the Muslim World League, with differences in how it is applied.
The limits: what is forbidden in any cause
The law then sets limits which a just cause does not remove. Allah forbids transgression even in fighting (2:190) and commands justice even toward people whom one dislikes (5:8). Killing an innocent person is among the gravest sins, and the Qur'an says that whoever kills a soul, other than for a killing or for corruption in the land, it is as if he had killed all mankind (5:32). The Prophet (saw) forbade the killing of women and children (Sahih al-Bukhari and Sahih Muslim), and the first caliph, Abu Bakr (ra), instructed his commanders not to kill the old, women or children, not to cut down fruit-bearing trees and not to kill monks in their cells (Muwatta' of Imam Malik, Book of Jihad).
The jurists applied this to those with whom Muslims have a covenant. The Prophet (saw) said that whoever kills a person under a covenant will not smell the fragrance of Paradise (Sahih al-Bukhari, Book of Jizya). Imams such as al-Nawawi and Ibn Taymiyya also discussed the offence of hiraba, which refers to spreading terror and attacking the public on the roads, and they treat it as a serious crime (5:33). The Amman Message of 2004, the open letter of scholars to the leaders of the so-called Islamic State in 2014, signed by over a hundred scholars from many countries, and the Marrakesh Declaration of 2016 all restate these limits.
Where scholars differ
Scholars differ on the cases that fall between the two poles. The first concerns resistance to an occupying force. Some contemporary scholars, among them Yusuf al-Qaradawi, have held that resistance to occupation is a duty and that operations directed at combatants are lawful; the application of this view to particular conflicts is itself disputed. Many other scholars, including those from Saudi Arabia, such as Ibn Baz and Ibn 'Uthaymin, and scholars of al-Azhar, opposed operations that harm civilians in any state, and were wary of tactics that bring greater harm to the community. The cases are disputed, and each side points to its own evidence.
The second concerns rebellion against a Muslim ruler. The majority of Sunni scholars, citing the hadith of the Prophet (saw) about patience with rulers and the avoidance of fighting them unless there is open disbelief (Sahih al-Bukhari, Book of Trials, and Sahih Muslim, Book of Leadership), held that rebellion generally causes greater harm than the oppression it seeks to end. Others, such as the Mu'tazila and some jurists, among them Abu Hanifa according to some reports, held that an uprising against an unjust ruler could be lawful, and the Qur'an gives rules for fighting the group that rebels (49:9), which are rules of mercy, such as not finishing off the wounded. The question therefore has a long history of scholarly argument, and every side condemns the killing of the innocent.
The danger of labels
Because the words 'extremist' and 'terrorist' carry heavy legal weight, they can be misused. Governments have used them against peaceful opponents, and groups that commit atrocities have used the language of oppression to justify them. A believer is therefore advised to judge by the conduct, which the Qur'an asks of everyone: 'Let not the hatred of a people prevent you from being just' (5:8). A person who rises against oppression by lawful means, for example by speaking, organising, litigating and supporting the victims, is not an extremist. A person who deliberately kills civilians is not excused by the injustice that moved him, and the scholars speak with one voice on this point. Oppressed people deserve justice, and the best way to serve them is by means that Allah has not forbidden.
Conclusion
Scholars do not accept the idea that everyone called an extremist or terrorist is an oppressed person standing up, nor that everyone so called is guilty. The Qur'an permits and even urges resistance to oppression, and in the same breath sets limits that no cause can lift, above all the protection of the innocent. Where scholars differ, on occupation and on rebellion, their differences concern the means, and a Muslim should judge each case by the evidence and the conduct, and not by labels.
References
Qur'an 2:190, 4:75, 4:171, 5:8, 5:32 to 5:33, 22:39, 42:42, 49:9
Sahih al-Bukhari, Book of Oppressions, Book of Jizya, Book of Trials and Book of Jihad; Sahih Muslim 2670 and Book of Jihad, Book of Leadership; Sunan Abi Dawud and Jami' al-Tirmidhi on the word of truth before an unjust ruler (graded hasan; sahih by al-Albani)
Muwatta' of Imam Malik, Book of Jihad (instructions of Abu Bakr)
Ibn Qudama, al-Mughni; Ibn 'Abidin, Radd al-Muhtar; Yusuf al-Qaradawi, Fiqh al-Jihad
The Amman Message (2004); Open Letter to al-Baghdadi (2014); the Marrakesh Declaration (2016)