The short answer
In terms of political rule, Christians held Jerusalem before Muslims did. The city was part of the Christian Roman (Byzantine) Empire when Arab Muslim armies conquered it in the 630s. Both religions, however, came long after Jews had made Jerusalem their capital and religious center, so neither Christians nor Muslims were the city’s first inhabitants or rulers.
Jerusalem before Christianity
Jerusalem was a city long before either faith existed. Under King David and then Solomon, according to the biblical tradition, it became the center of the Israelite kingdom, and the First Temple was built there. Later, it came under the Babylonians, Persians, Greeks and Romans. The Romans destroyed the Second Temple in 70 CE and, after a later revolt, barred Jews from the city for a time.
Christian Roman and Byzantine rule
Christianity began in Jerusalem, but the faith was at first a minority religion in a Roman city. This changed after Constantine, who became sole ruler of the Roman Empire in the early fourth century. Churches were built, including the Church of the Holy Sepulchre, and Jerusalem became a major pilgrimage site. For most of the following three centuries the city was under Christian Byzantine rule. There was one major interruption: the Sasanian Persians captured Jerusalem in 614, and the Byzantine emperor Heraclius recovered it around 629–630. The period is also part of the wider timeline of Byzantine emperors.
The Muslim conquest in the 630s
Arab Muslim forces defeated Byzantine armies in Syria and Palestine in the 630s. Jerusalem surrendered around 637 or 638, according to the traditional accounts, to the caliph Umar. Dates and details vary between sources. Later Umayyad rulers built the Dome of the Rock, completed around 691–692, on the Temple Mount, which Muslims call the Haram al-Sharif. Under early Muslim rule, Christians and Jews generally kept their places of worship, though under certain legal conditions.
Centuries of Muslim rule and the Crusader interlude
Control of the city passed between Muslim dynasties, including the Umayyads, Abbasids, Fatimids and Seljuks. Then the First Crusade took Jerusalem in 1099, and Latin Christians ruled it as the Kingdom of Jerusalem until Saladin recaptured it in 1187. That period is covered in the history of the Kingdom of Jerusalem. Muslim rulers then held the city, apart from a short return to Christian hands in 1229–1244, until the early twentieth century.
A city holy to three faiths
Jerusalem is sacred to Judaism, Christianity and Islam, and each tradition has its own account of its history. The sequence above is a political timeline. It is not an argument about who has the stronger claim today, which is a matter of ongoing dispute.