Muslim scholars in general, have struggled (no pun intended) with these and other aspects of Muhammads life for centuries. Still some historians believe Muhammad is an amalgamation by way of the Quran, Hadith and Sira, constructed later to give him a sort of omniscient status.
However these historical speculations have had no effect on Islamic doctrine or practice. So for the purpose of our debate, it is less important to know what really happened in Muhammads life than what is accepted, among the Islamic ummah, to have happened, because the latter forms the foundation of Muslim belief, practice and law.
Now I will present the history of Muhammad from the begining of his career as a prophet up to the point before The Battle of Badr, which was Islam's greatest early jihad victory. I believe the meaning of jihad cannot be truly appreciated until we examine the scope of Muhammads military campaign, but I think that presenting the early part of his career can give us glimpses into the origin and meaning of jihad.
Mecca
According to Muslim tradition, Muhammad was born in Mecca on the year 570. Visitations by the angel Gabriel began in Muhammads adulthood, he would later interpret these visitations as revelations from Allah and they would continue sporadically for the rest of his life.
At the age of 40 he proclaimed himself prophet of Allah and first began preaching his revalations to the people closest to him. His first wife Khadija became the first convert to his newfound faith, followed by Ali (who would later play a large role in the Sunni-Shiite schism), Bakr and a few others.
Three years after Muhammad proclaimed himself prophet of Allah he began preaching publically, this was the initial step toward injecting his religious ideas into the actualities of social and political life. Muhammad called upon his Meccan tribesmen (the Quraish) to embrace his faith with a warning from Allah, "I am a warner to you in face of a terrific punishment." His preaching was not recieved well by his fellow kinsmen and even his uncle Abu Lahab rejected Muhammads claim to prophethood. He called out to Muhammad, "May your hands perish all this day. Is it for this purpose you have gathered us?" Allah himself gave Muhammad his response to Abu Lahab in a new revelation: "May the hands of Lahab perish! Nothing shall his wealth and gains avail him. He shall be burnt in a flaming fire, and his wife, laden with ******s, shall have a rope of fibre around her neck!" (Q 111.1-5), (Bukhari #293). As we shall see, Muhammad often became frustrated by skeptics of his preaching.
Muhammad continued to preach with little success, his anger and fustration over his failure to convert the Quraish began to grow. On one occasion he came upon a group of Quraish at the Ka'ba. He walked around the stone three times and on the third pass he stopped and declared: "Will you listen to me, O Quraish? By him who holds my life in His hand, I bring you slaughter" (Ishaq:130/Tabari VI:101). Ultimately, Muhammad would turn from violent words to violent actions.
At the time before Muhammad the Arabs where among the most religious tolerant people, pagan Arabs in pre-Islamic times worshiped 360 gods. Mecca thrived on religious pilgrimages, it was known as a center of trade and pilgrimage, travelers from all the surrounding regions passed through Mecca. The Meccan merchants made great profits from the pilgrimages to the Ka'ba, local deities from all surrounding tribes were represented in the shrine. The Arabs tribes were frequently at war with each other, but among them all, the Meccans had an envious position. The holy place of all the sorrounding Arab tribes was in Mecca and that meant power and money for Meccans. So it is not difficult to understand why relationship between the fledgling Muslim cult and the Quraish worsened, as Muhammad became more vocal and his demands more persistant the Quraish became more hostile.
Madina
After years of increasing tension with the Quraish, Muhammad ordered his followers to leave Mecca and in 622 he himself fled to the nearby town of Medina at the invitation of some of his Muslim converts.
This emigration from Mecca to Medina is known as the Hijra and was a major turning point in Muhammads career, here he evolved from an ordinary apocalyptic preacher to a political and military leader.
In Medina Muhammads divine revalations began to change, the brief illustrational verses of the early revalations of the Quran surrenderd to long and straight foward language, much of which was concerned with laws for the new Muslim community. It should be noted that three Jewish tribes resided in Medina: The Banu Qaynuqa, Bani Nadir and the Banu Quraiza all of which exerted great influence in Medina and welcomed Muhammad and his newfound cult. It is evident that Muhammad was influenced by Judaism, many of his laws were formulated through dialogue with the Jews and soon he elevated himself among the ranks of Jewish prophets. He wanted to gain their acceptance of his prophetic status and adopted many Jewish rituals, such as forbidding pork and the practise of several daily prayers; Muhammad even had his adherents face Jerusalem for their prayers.
However, like the Quraish, relationship between the Jewish tribes of Medina and Muhammad became strained. The Jews would not accept Muhammad as their prophet and Muhammad did not take rejection well.
Muhammad began gaining power and influence among the residents of Medina, with the combination of the muhajiroun (Muslims who came from Mecca) and the flourishing ansar (Muslims who converted in Medina) Muhammad had a strong base of support. He now felt confident in confronting the Quraish, whom he begrudged, and began raiding their caravans.
These raids kept the young Muslim movement resolved by amassing wealth and prestige, consequentially these raids helped form Islamic theology. In one inccident a band of Muslims raided a Quraish caravan at Nakhla, a settlement not far from Mecca. The raiders attacked the caravan during the sacred month of Rajab, when fighting was forbidden.
Upon returning back to the Muslim camp loaded with booty, Muhammad refused to share in the loot or have anything to do with them, he said: "I did not order you to fight in the sacred month." Muhammad was now afflicted with a political dilemma because the Quarish attested that "Muhammad and his companions have violated the sacred month, shed blood therein, taken booty, and captured men" (Ishaq 287-288).
But then Muhammad recieved another revelation, Allah deemed that the Quraish's opposition to Muhammad and their failure to acknowledge his prophethood was more offensive than the Muslims violation of the holy month, the raid therefor was justified.
"They question thee, O Muhammad, with regard to warefare in the sacred month, Say: warfare therein is a great transgression, but to turn men from the way of Allah, and to disbelieve in Him and the Inviolable Place of Worship, and expel His people thence, is a greater transgression with Allah: for persecution is worse than killing" (Q 2.214).
The sin the Nakhla raiders commited in violating the holy month was nothing compared to the Quraish's sins. Their sins being that of opposing Muhammad and rejecting him as prophet. Once Muhammad recieved this revelation, he took his portion of the booty and prisoners.
Now this was a very signifcant revelation, because it led to the fundamental structure of jihad and Islamic principles that has had repercussions throughout the history of Islam. 'Good' became identified with Muhammads revelations (teachings and examples) and anything that was conducive to the benefit of Muslims and 'evil' became associated with anything that opposed Muhammads teachings or harmed Muslims, without reference to any larger moral standard. You can say that the Moral absolutes were swept aside in favor of an overreaching principle of self interest.