Following the departure of the British in 1948, the Jews declared an independent state of Israel, followed by fighting with Palestinians and neighbouring Arab states.
At the end of the war, east Jerusalem was in Jordanian hands while the new Jewish state set up its capital in the west.
The two sides were divided by barbed wire, sandbags and machinegun emplacements until the Six-Day War of 1967, when Israel seized and occupied the eastern zone.
It declared the whole city its eternal and united capital and in 1980 annexed east Jerusalem, a move never recognised by the international community.
Capital without embassies
Until the annexation, 13 countries maintained their embassies in Jerusalem: Bolivia, Chile, Columbia, Costa Rica, the Dominican Republic, Ecuador, El Salvador, Guatemala, Haiti, The Netherlands, Panama, Uruguay and Venezuela.
They all relocated to Tel Aviv, where other states had their legations.
Costa Rica and El Salvador returned to the city in 1984 but headed back to Tel Aviv in 2006.
US policy on holy city
In 1995, the US Congress passed an act stating "Jerusalem should be recognised as the capital of the State of Israel and the United States embassy in Israel should be established in Jerusalem no later than May 31, 1999."
Since then, implementation has been blocked by succesive US presidents.
Trump vowed during his election campaign to move the embassy from Tel Aviv to Jerusalem and to recognise the disputed city as Israel's capital.
He is due to partially fulfil that pledge on Wednesday, declaring Jerusalem Israel's capital, but only declaring his intent to move the embassy there, which could take years.
The traditional US position on the city has been that Jerusalem's status must be negotiated between the two sides.