Being a religious obligation, jihad is elaborately regulated in sharia law, which discusses in minute detail such matters as the opening, conduct, interruption and cessation of hostilities, the treatment of prisoners and noncombatants, the use of weapons, etc...