The Caliph Omar and Jerusalem
(638 CE)
At the end of the summer in the year 636 CE, following the Battle of Yarmuk, the outcome of which signaled the end of the Byzantine period in Palestine, the Muslims made for Jerusalem and laid siege to the city … and finally the city surrendered.
 
 
…. Tradition holds that the city's inhabitants, who had heroically withstood a series of attacks, declared that they would surrender to no one but the leader of the Muslim world himself and Omar indeed came to the city to accept the surrender. Omar is said to have entered the city riding a camel and wearing a simple camel-hair cloak. This modest entry embarrassed every one as it was contrary to Byzantine splendor. To the people of Jerusalem Omar proposed a convenient treaty of surrender, the contents of which were related by the Muslim historian Tabari and many more. Few points are as under.
 

"In the name of Allah the merciful and compassionate, this is the writ of protection [aman] which the servant of God, Omar, commander of the faithful, gives to the people of Aelia [the usual name for Jerusalem in the early Muslim period]... for their souls, their property, their churches, their crosses, the sick and the healthy, and their whole community..." The treaty contained several clauses….., the security for life and property; security for the churches and for ritual worship; freedom to choose whether to remain in the city or to leave in safety.

 

In between, the time of prayer approached and Nastorian Bishop requested Omar to perform the prayer in the Church. Omar turned down the request on the ground that in future Muslims can claim the Church. According to Muslim tradition, Omar built a modest mosque on the Temple Mount, where El-Aqsa Mosque now stands….

According to Muslim historians Omar allowed Jews to visit the complex which was banned earlier.

 
http://www.snunit.k12.il/njeru/ee31.htm