JERUSALEM — The ancient walls of Jerusalem’s Old City were lit up with images of the American and Israeli flags Wednesday as a ­token of appreciation of President Trump’s decision to formally recognize Jerusalem as Israel’s capital. But in the nearby Palestinian city of Bethlehem, the Christmas tree lights were switched off in protest.

Trump’s announcement that the U.S. Embassy would be moved to Jerusalem upended a decades-old Washington policy and was met in Israel and the Palestinian territories with scenes of celebration and of fury.

After days of tense anticipation, Palestinians and Israelis gathered around television sets to hear the president lay out the details of what he called a long-overdue decision.

“He pulled the trigger; Trump pulled the trigger,” said Majdi Busaileh, 43, as he watched incredulously at a social club in the Shufat camp in East Jerusalem, where the crowd had paused from snooker and card games to listen. Another man chimed in with profanities.

Palestinians burn Israeli and U.S. flags and posters of President Trump and Israeli Prime Minister Benjamin Netanyahu during a protest in Rafah, in the southern Gaza Strip, on Wednesday. (Mohammed Saber/EPA/EFE/REX/Shutterstock)

“It’s a joyous occasion,” said Ruth Lieberman, an Israeli political consultant across town. Lieberman said she had been busy organizing ways to cheer the announcement on social media because rain had put a damper on planned celebrations.

“We were hoping to dance in the street, but we are dancing in our hearts,” she said.

The bad weather also kept Palestinian protests to a minimum, although some went ahead in Gaza. An Israeli police spokesman said the force was prepared for the potential of larger protests in Jerusalem on Friday.

Successive U.S. administrations have held off moving the embassy from Tel Aviv since the mid-1990s, in line with an international consensus that Jerusalem’s status should be decided in a final peace agreement between the Israelis and the Palestinians. However, Trump said continuing that policy was “folly.”

His pledge to remain committed to the peace process was met with derision by Palestinians. In a televised address immediately after Trump spoke, Palestinian Authority President Mahmoud Abbas said the United States had signaled an end to its role as a broker in the peace process.

Abbas said that the U.S. decision rewarded Israel for its occupation of Palestinian territories and that the “reprehensible” act undermined all peace efforts. He described Jerusalem as the “eternal capital” of the Palestinian people and said that wouldn’t change.

Hamas, the militant group that runs the Gaza Strip, described the move as an assault on Palestinian rights that would “open the doors of hell,” and Islamic Jihad, the second-largest militant group in Gaza, called it a declaration of war. Thousands of Palestinians gathered across the coastal strip after evening prayers to protest. Some held banners declaring ­Jerusalem a “red line.” Others burned U.S. flags and pictures of Trump amid cheers from the crowds.

President Trump said Dec. 6 that the U.S. would recognize Jerusalem as Israel's capital and move the U.S. Embassy there. Here are key moments from that speech. (The Washington Post)

In the social club, Hamdi Diab, a camp leader, described the situation as a “time bomb.”

“This is an unprecedented, very dangerous escalation from the president of the United States,” he said. “It will ignite a third intifada.”

Israelis see Jerusalem as their eternal and undivided capital, while for Palestinians, the eastern part of the city is the future capital of a Palestinian state. Abbas said the U.S. move would galvanize the Palestinian struggle for independence.

Abdullah Alqam, who coordinates Palestinian factions in East Jerusalem, echoed that sentiment. “This is our land,” he said. “We will live in it; we will die in it. This step will only encourage radicalism.”

“Jerusalem has been the focus of our hopes, our dreams, our prayers for three millennia,” he said. “Jerusalem has been the capital of the Jewish people for 3,000 years.”

Some Israelis were more guarded, greeting Trump’s move as simply an acknowledgment of the status quo. Others said they hadn’t realized the United States did not already recognize Jerusalem as Israel’s capital.

“This announcement could be monumental but, at the same time, very anticlimactic,” said Yoni Katz, a Jerusalem resident.

But Lieberman, the political consultant, said she and others want to make sure Americans know how they feel about Trump’s decision.

“We welcome it,” she said. “It is not something new, but it is an important but understandable step by the administration. We would like to say thank you in a big way.”

Hazem Balousha in Gaza City and Sufian Taha in Jerusalem contributed to this report.