In 1947, the United Nations devised a plan to divide British mandate Palestine into three entities: a Jewish state, an Arab state and Jerusalem, which would have a unique status as an internationally controlled city.
Jewish leaders accepted the plan, but the Arab world rejected it.
Following the British withdrawal the next year, a war broke out in which Israel seized the west of the city, while Jordanians and Palestinians took the east.
In the next conflict in 1967 Israel seized control of east Jerusalem and later annexed it, in moves never recognised by the international community.
The predominantly Palestinian population in the east lives under full Israeli control, but cannot vote in parliamentary elections.
ISRAELI, PALESTINIAN VIEWS
Israel views the city as its undivided capital, with a Tuesday statement saying the city "is the capital of the Jewish people for 3,000 years and Israel's capital since 70 years."
The internationally recognised Palestinian government sees the eastern part as the capital of their future state.
Islamist movement Hamas, which controls Gaza and does not recognise Israel, calls Jerusalem the Palestinian capital.
In 1995, the US Congress passed the Jerusalem Embassy Act calling on the United States to move its embassy from Tel Aviv to Jerusalem, recognising it as Israel's capital.
The law is binding on the US government but a clause allowed presidents to postpone its application for six months on "national security interests".
Presidents Bill Clinton, George W. Bush and Barack Obama re-ratified the clause every six months.
Trump reluctantly renewed it for the first time in June 2017, despite promising during his campaign to move the embassy.
The position of the majority of the international community has been largely unchanged for decades.
Essentially Jerusalem is viewed as an issue for final status negotiations between the two sides.
United Nations statements suggest, however, that the city could remain the capital of both Israel and a future Palestinian state in any deal.
The vast majority of countries have largely followed this line.
All embassies are based in the commercial capital Tel Aviv, but most countries simply do not specify what they consider to be Israel's capital.
Thirteen countries did have embassies in Jerusalem until 1980, however, when a UN resolution called upon them to remove them.
Bolivia, Chile, Colombia, Costa Rica, Dominican Republic, Ecuador, El Salvador, Guatemala, Haiti, the Netherlands, Panama, Uruguay and Venezuela then shifted their embassies.
Earlier this year Israeli media trumpeted a Russian government statement that for the first time specifically said "we view West Jerusalem as the capital of Israel".
This appeared to be a shift in policy position and was hailed by some Israeli politicians, though it had little practical implication.
The statement also recognised "east Jerusalem as the capital of the future Palestinian state".