The Prophet ﷺ personally led twenty-seven military expeditions (called ghazwah) and dispatched many more under his Companions (called sariyyah). Fighting was permitted only after thirteen years of patience in Makkah, when the verse "Permission [to fight] has been given to those who are being fought, because they were wronged" (22:39) was revealed. The battles below are the most pivotal in the Madinan period, each shaping the destiny of the new community and, in time, the wider world.
غزوة بدر
Badr - 2 AH / 624 CE. The first decisive battle. 313 Muslims, poorly armed, faced about a thousand Quraysh near the wells of Badr. Allah sent down angels to support them (3:124-125), and the Muslims won a stunning victory, killing leaders like Abu Jahl and Umayyah ibn Khalaf. Badr is called "the Day of the Criterion" (yawm al-furqan) - the day truth and falsehood were finally separated.
غزوة أحد
Uhud - 3 AH / 625 CE. The Quraysh returned with 3,000 men to avenge Badr. The Muslims, 700 strong, met them at Mount Uhud north of Madinah. The Prophet ﷺ posted fifty archers on a hill with strict orders not to leave their position. When the Muslims appeared to win, most of the archers descended to collect spoils; Khalid ibn al-Walid (still not yet Muslim) swept around the hill and attacked from behind. Seventy Muslims were martyred, including the Prophet's beloved uncle Hamzah (ra); the Prophet ﷺ himself was wounded, his tooth broken and his face cut. Uhud taught the bitter lesson that obedience to the Prophet's command outweighs immediate gain.
إجلاء بني النضير
Banu Nadir - 4 AH. After repeated treachery and an assassination attempt against the Prophet ﷺ, the Jewish tribe Banu Nadir was besieged in their fortresses outside Madinah. They surrendered and were exiled, allowed to take what their camels could carry except weapons. Most went to Khaybar. Surah al-Hashr was revealed about this expulsion.
غزوة الخندق
The Trench / al-Khandaq - 5 AH / 627 CE. Quraysh assembled a confederate army of 10,000 from many tribes to wipe out Madinah. On the suggestion of the Persian Companion Salman al-Farisi (ra), the Muslims dug a trench across the open northern approach to the city - an entirely new tactic in Arabia. The Prophet ﷺ himself dug alongside the Companions, tying a stone to his stomach against hunger. The siege lasted about a month; cold winds and starvation broke the confederates, and Allah scattered them with a storm (33:9). It was after this that the Prophet ﷺ said: "Now we shall march against them and they shall not march against us." The initiative had passed permanently to Madinah.
غزوة بني قريظة
Banu Qurayzah - 5 AH. During the siege of the Trench, the Jewish tribe Banu Qurayzah, bound to Madinah by treaty, secretly broke their covenant and conspired with the besieging confederates. After the storm scattered the enemy, they were besieged in turn. They asked Sa'd ibn Mu'adh (ra), an ally before Islam, to judge them by the law of their own scripture. Sa'd ruled, in line with Deuteronomy 20, that the fighting men be executed and the women and children taken captive. The judgement applied to the men of Qurayzah alone, in their own legal tradition, after a clear act of high treason during a siege that nearly destroyed Madinah.
صلح الحديبية
Treaty of Hudaybiyyah - 6 AH / 628 CE. The Prophet ﷺ set out with 1,400 Companions to perform Umrah, dressed in ihram and bringing no weapons but the traveller's sword. Quraysh barred them at Hudaybiyyah, on Makkah's outskirts. After tense negotiations, a ten-year truce was signed; some terms appeared humiliating - the Muslims would return without performing Umrah, and any Quraysh who fled to Madinah would be sent back, but not the reverse. Umar (ra) was deeply distressed; Abu Bakr (ra) reassured him to trust the Prophet ﷺ. Allah called it "a manifest victory" (48:1). In the two years of peace that followed, Islam spread more than in all the years before, and many of Quraysh's finest, including Khalid ibn al-Walid and Amr ibn al-As, became Muslims.
غزوة خيبر
Khaybar - 7 AH / 628 CE. The oasis of Khaybar, 150 kilometres north of Madinah, had become the base of hostile Jewish refugees from Banu Nadir and a source of conspiracies against the Muslims. The Prophet ﷺ marched with about 1,600 men. After several other fortresses had fallen, the great fortress of al-Qamus held out; the Prophet ﷺ said, "Tomorrow I will give the banner to a man who loves Allah and His Messenger and whom Allah and His Messenger love." He gave it to Ali ibn Abi Talib (ra), who took the fortress. Khaybar was opened, and the inhabitants were allowed to remain working the land in exchange for half the produce - a model later used for many lands brought into Islam.
غزوة مؤتة
Mu'tah - 8 AH / 629 CE. The Prophet ﷺ sent an envoy to the Christian Ghassanid governor of Bostra; the envoy was murdered, an act of war by the standards of the time. A force of 3,000 Muslims was sent under Zayd ibn Harithah (ra), with Ja'far ibn Abi Talib (ra) and Abdallah ibn Rawahah (ra) named as successors. They met around 100,000 Byzantine and Arab Christian troops at Mu'tah in modern Jordan. All three commanders were martyred in turn; the Prophet ﷺ wept for them in Madinah, telling the Companions of their fall while he sat in the mosque. Khalid ibn al-Walid (ra) then took the banner, used nine swords in the fighting, and skilfully extricated the Muslim force - earning the title Sayf Allah (the Sword of Allah).
فتح مكة
Fath Makkah (Conquest of Makkah) - 8 AH / 630 CE. When Quraysh's allies broke the Treaty of Hudaybiyyah by attacking Khuza'ah, the Prophet ﷺ marched on Makkah with ten thousand Companions, the largest Muslim force gathered to that day. Abu Sufyan came out at night and accepted Islam in the camp of al-Abbas (ra). The Prophet ﷺ entered the city virtually without bloodshed, his head bowed in humility upon his she-camel so low that his beard nearly touched the saddle. He went straight to the Ka'bah and cleansed it of the three hundred and sixty idols around it, reciting "Truth has come and falsehood has vanished" (17:81); the great idol Hubal was thrown down. Standing at the door of the Ka'bah he addressed the trembling Quraysh - the same people who had tortured, banished and plotted to kill him - and said, "What do you think I will do with you?" They answered, "A noble brother and the son of a noble brother." He replied, "Go, for you are free." It was the greatest amnesty in human history.
غزوتا حنين والطائف
Hunayn and Ta'if - 8 AH / 630 CE. Soon after the conquest of Makkah, the tribes of Hawazin and Thaqif assembled a massive force at Hunayn to crush the rising Muslim power. The Prophet ﷺ marched out with twelve thousand men, the largest Muslim army yet, and some of them said with pride, "We will never be defeated today because of our numbers." Allah did not approve of that pride. The Hawazin archers, hidden in the gorges of Hunayn, surprised the Muslim front line at dawn, and many fled. The Prophet ﷺ remained firm on his white mule, calling out, "I am the Prophet, no lie; I am the son of Abd al-Muttalib." Al-Abbas (ra) gathered the Companions, the angels came down, and Allah turned defeat into victory - as the Quran records, "Then Allah sent down His tranquillity on His Messenger and on the believers, and sent down forces you did not see" (9:25-26). The Muslims then besieged Ta'if, the stronghold of Thaqif, for over twenty days. Catapults were used; the Prophet ﷺ raised the siege without taking the city and prayed, "O Allah, guide Thaqif and bring them." Their delegation arrived the following year and accepted Islam.
غزوة تبوك
Tabuk - 9 AH / 630 CE. Reports reached Madinah that Heraclius was massing a Byzantine army to invade Arabia. Despite the burning desert heat and the ripe harvest at home, the Prophet ﷺ called for a general mobilisation, and about thirty thousand believers responded - the largest army he ever led. The march to Tabuk on the Syrian frontier was a severe trial; some men shared a single date, and the army was called Jaysh al-Usrah (the Army of Hardship). When they reached Tabuk no Byzantine force appeared; the Prophet ﷺ camped for twenty days, made treaties with the border chiefs, and returned without battle. The expedition's greatest lesson was the case of the three sincere believers who stayed behind without excuse - Ka'b ibn Malik, Hilal ibn Umayyah, and Murarah ibn al-Rabi (ra). The Prophet ﷺ commanded the entire community to shun them for fifty days; even their wives kept apart. Ka'b later said the earth itself, vast as it was, grew narrow upon him. Then Allah accepted their repentance and revealed, "And to the three who were left behind... until they thought there was no refuge from Allah except in Him" (9:118).