*Says decision is in the best interest of peace
Mr Trump described the move as “a long overdue step” to advance the Middle East peace process.
The president said the US would support a two-state solution, if approved by both the Israelis and the Palestinians.
Palestinian President Mahmoud Abbas responded to the decision by saying the US could no longer be a peace broker.
He earlier warned of “dangerous consequences” through a spokesman.
Speaking at the White House, Mr Trump said he had “judged this course of action to be in the best interests of the United States of America, and the pursuit of peace between Israel and the Palestinians”.
The president said he was directing the US state department to begin preparations to move the US embassy from Tel Aviv to Jerusalem.
In response, Israeli Prime Minister Benjamin Netanyahu said it was a historic day, and Israel was profoundly grateful to President Trump.
Jerusalem contains sites sacred to the three major monotheistic faiths.
East Jerusalem, which includes the Old City, was annexed by Israel after the Six Day War of 1967, but is not internationally recognised as part of Israel.
The US decision comes despite vocal opposition in the Muslim world, even among US allies.
But moving the embassy fulfils a campaign promise and appeals to Mr Trump’s right-wing base.
Recognising Jerusalem as Israel’s capital was “nothing more or less than a recognition of reality”, the president said.
“It is also the right thing to do,” he added.
The decision to recognise Jerusalem as Israel’s capital is a reversal of decades of US foreign policy, and differs sharply from the rest of the international community’s view on Jerusalem’s status.
The Palestinians claim East Jerusalem as the capital of a future state, and according to the 1993 Israel-Palestinian peace accords, its final status is meant to be discussed in the latter stages of peace talks.
Israeli sovereignty over Jerusalem has never been recognised internationally, and until now all countries have maintained their embassies in Tel Aviv.
United Nations Secretary General Antonio Guterres said it was “a moment of great anxiety”.
“There is no alternative to the two-state solution. There is no Plan B,” he said.
French President Emmanuel Macron said France did not support the move and called for calm.
Palestinian Islamist group Hamas said that Mr Trump’s decision would “open the doors of hell” on US interests in the region.
In remarks delivered in the diplomatic reception room of the White House, Trump called his decision “a long overdue” step to advance the peace process.
“I have determined that it is time to officially recognize Jerusalem as the capital of Israel,” Trump said. “While previous presidents have made this a major campaign promise, they failed to deliver. Today, I am delivering.”
Trump said: “My announcement today marks the beginning of a new approach to the conflict between Israel and the Palestinians.
“I’ve judged this course of action to be in the best interests of the United States of America and the pursuit of peace between Israel and the Palestinians.”
The announcement broke with years of precedent, but Trump said that the US remained committed to a two-state solution, and insisted that he was not dictating how much of Jerusalem should constitute Israel’s capital – leaving open the possibility that East Jerusalem would be the capital of a future Palestinian state.
“The United States remains deeply committed to helping facilitate a peace agreement that is acceptable to both sides. I intend to do everything in my power to help forge such an agreement.”
The French president, Emmanuel Macron, said: “This decision is a regrettable decision that France does not approve of and goes against international law and all the resolutions of the UN security council.”
The move was also condemned by US allies Turkey, Jordan, Egypt and Lebanon.
The United Nations secretary general, António Guterres, said that there was no alternative to a two-state solution between Israel and the Palestinians and that Jerusalem was a “final-status issue” that should be resolved through direct talks.
“I have consistently spoken out against any unilateral measures that would jeopardize the prospect of peace for Israelis and Palestinians,” he said.
Israel’s government rushed to congratulate Trump for the speech, which the prime minister, Benjamin Netanyahu, described as an “important step toward peace”.
But the Palestinian president, Mahmoud Abbas, said that the US had effectively abdicated its role as a mediator in the region. Saeb Erekat, who long served as the Palestinians’ top negotiator, told journalists that Trump had “destroyed the two-state solution.”
Erekat warned that “it is really throwing the whole region into chaos – international chaos.”
In a social club in the heart of Jerusalem’s Shuafat refugee camp, young Palestinian men grew increasingly angry as they watched the speech.
“This is shit. This is shit,” a man called Abu Atya told the Guardian in English. “He’s just said Jerusalem is the capital of Israel! This speech is going to cause big trouble.”
Another man, Hamdi Dyab, grew incredulous and increasingly agitated as he watched the speech, translated into Arabic on a Palestinian television channel.
“He’s saying he’s going to move the embassy,” he said. “This is very dangerous speech. Things don’t look good. We are calling for a new intifada.”
Another man shouted: “He’s pulled the trigger.”
Earlier, Sheikh Abdullah al-Qam, the coordinator of a Jerusalem committee representing Palestinian factions in east Jerusalem – and a leader during the first intifada – also delivered a stark warning.
“This will harm America because they present themselves as fair broker between Israelis and Palestinians,” he said. “This will only encourage extremism. It will encourage Isis. Over one billion Muslims are asking why he is taking this step.”
White House officials have said that there would be no immediate move of the US embassy, as it would take at least three years to plan and build new facilities in Jerusalem.
Meanwhile, Trump will continue to sign six-monthly waivers to the Jerusalem embassy act of 1995, in which Congress demanded an immediate move and threatened to take punitive measures against the state department’s budget until it was carried out.
Trump’s son-in-law and adviser, Jared Kushner, has been talking to Middle East leaders over the past 10 months, with the aim of putting together a new peace plan early next year. Kushner is known to be close to the Saudi crown prince, Mohammad bin Salman, who has also sought to break with precedent and tradition in his country’s foreign policy.
It remains unclear how far Prince Salman is ready to go to break with traditional Saudi policy of support for Palestinian aspirations of an independent state with a capital in East Jerusalem.
The Jerusalem decision divided the Trump administration, with Vice-President Mike Pence and the US ambassador to Israel arguing for the move, and the secretaries of defence and state, James Mattis and Rex Tillerson, fighting a rearguard action against it because of its potential disruptive impact.
Trump is reported to have decided to go ahead to fulfil an election campaign promise and satisfy his core support among evangelical and conservative Christians.
At present, 86 countries have embassies in Tel Aviv, none in Jerusalem