WASHINGTON — President Trump on Wednesday formally recognized Jerusalem as the capital of Israel, reversing nearly seven decades of American foreign policy and setting in motion a plan to move the United States Embassy from Tel Aviv to the fiercely contested Holy City.

“Today we finally acknowledge the obvious: that Jerusalem is Israel’s capital,” Mr. Trump said from the Diplomatic Reception Room of the White House. “This is nothing more or less than a recognition of reality. It is also the right thing to do. It’s something that has to be done.”

The president cast his decision as a break with decades of failed policy on Jerusalem, which the United States, along with virtually every other nation in the world, has declined to recognize as the capital since Israel’s founding in 1948. That policy, he said, brought us “no closer to a lasting peace agreement between Israel and the Palestinians.”

“It would be folly to assume that repeating the exact same formula would now produce a different or better result,” Mr. Trump declared.