According to the Old Testament, David brought the sacred Ark of the Covenant to Jerusalem from Qiryat Ye'crim (a holy place of the time, west of Jerusalem) and installed it in a new tabernacle, built a royal palace and other buildings, and strengthened the city's fortifications. Although David greatly expanded the Kingdom of Israel and made Jerusalem its capital, the city and the temple he built were quite modest. Solomon, his son and successor, improved the temple and enlarged the city. He built a city wall and many buildings on a scale of magnificence previously unknown in Israel.Solomon's Temple was destroyed and the Jews exiled by the Babylonians in the year 586 BC. In 539 BC, Babylonia was conquered by the Persians (see Persia), who allowed the Jews to return to Jerusalem the following year. The construction of a new temple, or Second Temple, was then undertaken on the ruins of the old. Jerusalem was captured by Alexander the Great in 333 BC, and after his death it came under the rule first of Egyptians and later of Syrians. The Syrian ruler Antiochus IV attempted to wipe out the Jewish religion by destroying a large part of Jerusalem in 168 BC. This caused a Jewish revolt under the leadership of Judas Maccabeus, a member of a priestly ruling family, the Hasmonaeans (see Maccabees). He liberated Jerusalem from the Syrians in 165 BC and later extended Hasmonaean rule over a large part of Judea. Jerusalem became the destination of annual Jewish pilgrimage from the outlying area, since certain religious obligations could only be fulfilled in the temple. All Jewish sacred and secular law and power came to be concentrated in the city.This power was eclipsed with the conquest of Jerusalem in 63 BC by the Roman general Pompey the Great. Herod the Great became king of Judea in 37 BC. During his administration, which lasted until 4 BC, Herod rebuilt the temple, constructed a fortress, and enhanced other elements of the city. The retaining wall built by Herod for the Temple Mount stands today as the Western Wall. After Herod's reign, a series of Roman governors were installed. From AD 26 to 36 the governor was Pontius Pilate, who sentenced Jesus to be crucified for treason. The Jews revolted against increasingly oppressive Roman rule in AD 66, and they managed to hold on to Jerusalem in the face of seige until AD 70. In that year, the city was captured by Titus, son of the Roman emperor Vespasian, who destroyed the Temple, except for the Western Wall. The city suffered almost complete destruction during the rebellion (132-135) led by Simon Bar Kokhba, following which the Jews were banished from the city. Under the Roman emperor Hadrian, the city was rebuilt as a pagan city, and its name was changed to Aelia Capitolina. Although the city effectively retained Jerusalem as its name, it did not serve again as a capital until Israeli independence in 1948.
In the intervening years, Jerusalem gained stature in religious terms; in administrative and political terms, however, it remained relatively inconsequential. Under Roman rule, the city became a destination for Christian pilgrimage, and the Church of the Holy Sepulchre was built during the reign of Emperor Constantine.. Roman support for churches and religious figures gave the city an increasingly Christian aspect.