Jerusalem was known in Abraham's time, and later, was captured by the Israelites to become David's capital. It has changed hands several times over the centuries and been twice destroyed. For centuries, it was under Islamic and briefly crusader rule, but in recent years, it has become again the capital of the Jewish state.
Jerusalem upto A..D.70
Early history Jerusalem enters the history of Israel with Abraham, who dealt with the king of Salem, almost certainly Jerusalem . It was captured by King David, who spared its Jebusite inhabitants, and became his capital  at which time it was enlarged, and his son, Solomon, built the temple. It became a prosperous city at the junction of the trading routes from Egypt to Mesopotamia and the spice route from Sheba [Yemen.] Collapse and renewal In 587, Jerusalem fell to the Babylonians and was destroyed, along with the temple, which was looted and the inhabitants deported. It remained derelict for seventy years until the Persians conquered Babylon and allowed the Jews home. They then, rebuilt the city and created the second temple. It stayed peacefully under Persian rule until Alexander the Great took it and established Greek rule. After a brief period of independence under the Hasmonaeans, the Romans took over, ruling variously through the Herod or procurators. It was Herod the Great [37-4 b.c.e] who rebuilt the temple. However, after a massive revolt which ended in 70.A.D, the Romans destroyed the city and the temple, renaming it Aelia Capitolina. It becomes part of Palestinian history at that time, as Jews were not allowed to enter in Jerusalem.
Until 638, it was under Roman and Byzantine rule, during which period it was a Christian city and had its own Patriarch, though it had to withstand ferocious Persian attacks in 626. In 638, the Muslims took the city, when the Patriarch surrendered to Caliph Omar, who did not harm its inhabitants. During these years, they built the Al Aqsar mosque on the site of Solomon's temple Until 1099, it remained under Muslim rule, when it was taken by Crusaders, some of whom massacred its inhabitants. This Latin kingdom of Jerusalem endured until 1188, when it was abandoned by the Latins, and the Muslims retook the city. In 1948, the Jewish state shared Jerusalem with the Palestinians, but after the six day war, Israel took control of the whole city and the Jewish population has expanded at the expanse of the Arab. The city has expanded beyond its original mountain site onto surrounding land. It is now a key issue in the Israel versus Palestine conflict. It became Israel's capital, but the Palestinians want it as their capital.