Of the 3 main Jewish tribes of Madinah, the Banu Nadhir and the Banu Quraiza went into self-exile and settled at Khaibar, a town situated 320 km north of Madinah. This town possessed a number of fortresses and fortifications all around, thus making it difficult to gain entry.
They took advantage of the distance and became more active in the final attempt to harm the march of Islam.
After the Battle of Ahzaab (Trenches) in 5 A.H. the malice of the Jews increased in greater intensity. These tribal skirmishes burdened the patience of the Muslim army.
Rasulullah set out with 1600 men from Madinah to Khaibar. Some Muslim ladies accompanied the Muslim army. It was the first time that an Islamic standard was introduced of 3 Islamic flags.
One was prepared from the shawl of Hazrat Bibi Ayesha (R.A.) and it was entrusted to Hazrat Ali.
Rasulullah ordered an attack and one by one the fortresses fell into Muslim hands. When they reached the famous fort called Q'moos, the Muslims spent 20 days without entry.
Rasulullah was hopeful of gaining success and handing over the flag and sword to Hazrat Ali, he appointed him as Commander of the troops.
Eventually the Fortress was captured. Some 15 Muslim Mujahids (soldiers) achieved martyrdom and 93 Jews were killed.
The Jews sued for peace and came begging for forgiveness. A peace treaty was signed between the Muslims and the Jews.