This is another article in the section Jihad from the classical manual on Sharia called Reliance of the Traveller. The articles are posted one by one in the order they are given in the book.
THE OBLIGATORY CHARACTER OF JIHAD
O9.1 Jihad is a communal obligation (def: c3.2). When enough people perform it to successfully accomplish it, it is no longer obligatory upon others (O: the evidence for which is the Prophet’s saying (Allah bless him and give him peace),
“He who provides the equipment for a soldier in jihad has himself performed jihad,”
and Allah Most High having said:
“Those of the believers who are unhurt but sit behind are not equal to those who fight in Allah’s path with their property and lives. Allah has preferred those who fight with their property and lives a whole degree above those who sit behind. And to each. Allah has promised great good” (Koran 4:95).
If none of those concerned perform jihad, and it does not happen at all, then everyone who is aware that it is obligatory is guilty of sin, if there was a possibility of having performed it. In the time of the Prophet (Allah bless him and give him peace) jihad was a communal obligation after his emigration (hijra) to Medina. As for subsequent times, there are two possible states in respect to non-Muslims.
The first is when they are in their own countries, in which case jihad (def: O9.8) is a communal obligation, and this is what our author is speaking of when he says, “Jihad is a communal obligation,” meaning upon the Muslims each year.
The second state is when non-Muslims invade a Muslim country or near to one, in which case jihad is personally obligatory (def: c3.2) upon the inhabitants of that country, who must repel the non-Muslims with whatever they can).
O9.2 jihad is personally obligatory upon all ‘those present in the battle lines (A: and to flee is an enormity (dis: pH)) (O: provided one is able to fight. If unable, because of illness or the death of one’s mount when not able to fight on foot, or because one no longer has a weapon, then one may leave. One may also leave if the opposing non-Muslim army is more than twice the size of the Muslim force).
O9.3 Jihad is also (O: personally) obligatory for everyone (O: able to perform it, male or female, old or young) when the enemy has surrounded the Muslims (O: on every side, having entered our territory, even if the land consists of ruins, wilderness, or mountains, for non-Muslim forces entering Muslim lands is a weighty matter that cannot be ignored, but must be met with effort and struggle to repel them by every possible means. All of which is if conditions permit gathering (A: the above-mentioned) people, provisioning them, and readying them for war. If conditions do not permit this, as when the enemy has overrun the Muslims such that they are unable to provision or prepare themselves for war, then whoever is found by a non-Muslim and knows he will be killed if captured is obliged to defend himself in whatever way possible. But if not certain that he will be killed, meaning that he might or might not be, as when he might merely be taken captive, and he knows he will be killed if he does not surrender, then he may either surrender or fight. A woman too has a choice between fighting or surrendering if she is certain that she will not be subjected to an indecent act if captured. If uncertain that she will be safe from such an act, she is obliged to fight, and surrender is not permissible).