Summarize this text:

Muhammad was able to make an unarmed pilgrimage to Mecca in 628 as he gained a truce for ten years, enabling the Muslim community to more than double in the next two years. Muhammad sent messages to the Persian emperor Khusrau, the Byzantine emperor Heraclius and the patriarch at Alexandria. The Persian viceroy Badhan in Yemen was converted when the prophet's messengers correctly informed him that Khusrau had been killed. Muhammad marched against the Khaybar Jews; though outnumbered, the Muslims were able to overcome the Jews a few at a time. The Jews of Khaybar had to surrender half their crops to the Muslims. After a minor infraction of the truce by two Quraysh, a Muslim army of 10,000 attacked Mecca and took over the city as the idols and icons were destroyed. Other towns were attacked by the large Muslim army, and Muhammad announced that slaves who joined the Muslims would be freed. In 630 he sent a Muslim army of 30,000 that included 10,000 cavalry to attack Byzantine Syria, but he made peace treaties with Christian and Jewish communities along the Gulf of 'Aqabah coast. Muhammad sent officials to collect taxes to support the poor. On his last pilgrimage to Mecca the prophet banned pagans from participating. Muhammad married eleven times and died of illness on June 8, 632.

Muhammad gained a truce for ten years which allowed the Muslim community to grow rapidly. He sent messages to various leaders, converted the Persian viceroy, defeated the Khaybar Jews, and took over Mecca with a large Muslim army. Muhammad made peace treaties with other communities, collected taxes to help the poor, and banned pagans from participating in his last pilgrimage. He married eleven times and died of illness in 632.