Answer: 630 CE.
Explanation/detail:
Mohammad had originally been from Mecca, but departed from there in 622 when he was warned of a plot by merchants in Mecca to assassinate him. His journey from Mecca to Medina in 622 is refered to as the <em>hijra</em> (also spelled <em>"hijrah" </em>or <em>"hegira"</em> in some variations of spelling in English). The term means an "exodus" or migration or movement. In Medina, Mohammad built up a following for his new religious faith, Islam.
In 628 CE, Mohammad and over 1000 Muslims set out from Medina to Mecca as a religious pilgrimage. When they were approaching Mecca, Mohammad sent a messanger into the city to say that his group was coming only to perform a religious ritual, and were not seeking conflict. They were not permitted to enter the city that year, but an agreement was reached with the Meccans, the Treaty of Hudaybiyah, which would allow them to do so in the future. The treaty outlined plans for peaceful relations between the Muslims and the people of Mecca for ten years. However, the treaty was soon broken when an Arab tribe that was allied with the Meccans attacked and killed members of a tribe allied with Mohammad and the Muslims. This dissolved the treaty, and Mohammad decided to go to Mecca with an army of 10,000 Muslims. Arriving at Mecca, Mohammad announced that no harm would come to those who did not try to fight his Muslim army, saying: "This day no reproach shall be on you. God will forgive you; He is the Most Merciful of the Merciful. You can go away!" The Meccans essentially yielded to Mohammad and the Muslims, and so Mecca came under Muslim control without bloodshed in 630 CE.