Muhammad claimed to be God's mouthpiece, but was extremely cautious in the way he asserted the claim. For three years his followers formed a secret society, and before that there was a revelation on Mount Hirah near Mecca. The earliest revelations took the form of solemn utterances which rhymed and were revealed only to his nearest relatives. He would speak in a trance and followers wrote down the utterances. The revelations would eventually make up the Qur'an.
This early work was done in private within the family but, by the time Muhammad made his first appearance as a public preacher in Mecca in 616, he already had a united following. As he became more successful, some of his followers were persecuted and he found refuge for them in Axum. The Abyssinian king took the side of the refugees, apparently thinking that they were persecuted Christians — completely misunderstanding who and what they were. They were nevertheless being supported, and this diplomatic victory infuriated the Meccan leaders who blockaded Muhammad in one quarter of the city.
Muhammad was glad, for his own safety, to have an invitation to go to Yathrib (later named Medina) as dictator; the citizens at Yathrib suffered from feuding and wanted an outsider to act as arbitrator. Accordingly he went into exile to Medina and 16 July 622 is taken as the start of the Muslim era.The Meccan authorities were alarmed at the prospect of a hostile regime in control at Medina, which lay on an important caravan route, and plans were laid to have Muhammad killed. The Prophet, as he came to be known, took temporary refuge in a cave, delaying his arrival at Medina until 20 September (the Jewish Day of Atonement) in 622.
From this point on, Muhammad's power grew. He bound his followers to himself and then to one another by a range of ties, instituting brotherhoods. At first, Muhammad seems to have courted an alliance with the Jews, but found no possibility of compromise with them on religious questions. Islam began to evolve its distinct practices and customs to distinguish it clearly from other sects. The spread of Islam was swift and proof of conversion was reduced to a simple test, the expression of belief in Allah and Muhammad.
He repelled an attempt by the Meccans to capture Medina. Mecca itself fell to Muhammad and his Islamic warriors in 629. It was an historic moment; the moment when Meccans had to recognise him as chief and prophet. Remarkably, within the year, Muhammad had control over the whole of Arabia. Islam was now firmly established as a religion of regional importance, and its future as one of the world's major religions was assured.