From the time of Muhammad, the final prophet of Islam, many Muslim states and empires have been involved in warfare. The concept of jihad, the religious duty to struggle, has long been associated with struggles for promoting a religion, although some observers refer to such struggle as "the lesser jihad" by comparison with inner spiritual striving. Islamic jurisprudence on war differentiates between illegitimate and legitimate warfare and prescribes proper and improper conduct by combatants. Numerous conquest wars as well as armed anti-colonial military campaigns were waged as jihads. Islamic military jurisprudence Islamic concepts concerning war refer to what have been accepted in Sharia (Islamic law) and Fiqh (Islamic jurisprudence) by Ulama (Islamic scholars) as the correct Islamic manner which is expected to be obeyed by Muslims in times of war. Some scholars and Muslim religious figures claim that armed struggle based on Islamic principles is referred to as the Lesser jihad. Fighting is justified for legitimate self-defense, to aid other Muslims, and after a violation in the terms of a treaty; but should be stopped if these circumstances cease to exist. War should be conducted in a disciplined way, to avoid injuring non-combatants, with the minimum necessary force, without anger and with humane treatment towards prisoners of war. Early Muslim conquestsMilitary career of MuhammadDiplomatic career of Muhammad and List of battles of Muhammad The earliest forms of warfare by Muslims occurred after the migration (hijra) of Muhammad and his small group of followers to Medina from Mecca and the conversion of several inhabitants of the city to Islam. At this time, Muslims had been persecuted and oppressed by the Meccans. There were still Muslims who could not flee from Mecca and were still oppressed because of their faith. The Meccans also refused to let the Muslims enter Mecca and by that denied them access to the Ka'aba. Major battles in the history of Islam arose between the Meccans and the Muslims; one of the most important to the latter was the Battle of Badr in 624 AD.