Israel and the United Arab Emirates agreed Thursday to end decades of enmity in a historic deal announced by President Trump that would put Israeli annexation of West Bank lands on hold as a condition of normalizing relations.

The agreement makes the UAE only the third Arab country to currently have diplomatic relations with the Jewish nation, after Egypt and Jordan recognized Israel’s right to exist decades ago, and it unites Israel with a powerful Persian Gulf ally of Washington that shares the view of Iran as an enemy.

Trump heralded the deal as a major development for a region that has been beset by violence for decades over the issue of Israel’s place in the Middle East and whether it can coexist peacefully with its Arab neighbors.

“By uniting two of America’s closest and most capable partners in the region — something which [was] said could not be done — this deal is a significant step towards building a more peaceful, secure and prosperous Middle East,” Trump said at the White House.

The agreement also serves as a major foreign policy victory for Trump just months before Election Day at a time when polls show him trailing presumptive Democratic nominee Joe Biden, who has touted his decades of foreign policy experience in the Senate and as vice president.

Trump made a Middle East peace deal a pillar of his foreign policy early in his administration, and until Thursday there was little evidence of any progress toward that goal. While Thursday’s announcement falls short of Trump’s promises, it gives him a significant step to point to on the campaign trail.

Trump told reporters that the atmosphere between Israeli Prime Minister Benjamin Netanyahu and UAE leader Sheikh Mohammed bin Zayed during the secret negotiations leading up to the announcement “was like love.”

But the West Bank’s governing Palestinian Authority, following an emergency meeting in Ramallah, condemned the accord as a betrayal.

Palestinian leaders called for an urgent Arab League meeting to reject what they called an “aggression against the Palestinian people.”

“The leadership affirms that the UAE, or any other party, has no right to speak on behalf of the Palestinian people,” the statement said.

The Palestinian Authority withdrew its ambassador to the UAE in protest.

More Arab gulf states are expected to follow the UAE’s lead, all under the condition that Israel suspend controversial plans to take control of parts of the West Bank claimed by Palestinians for a future state.

UAE officials said they were motivated to make the bold stroke in part because Israel’s move to annex swaths of the West Bank threatened to upend decades of hope that the Palestinians would eventually gain sovereignty over their own territory.

Annexation “would deal a death blow to the two-state solution,” said UAE Foreign Minister Anwar Gargash. “The UAE is using its gravitas, its promise of a relationship to try to really unscrew a time bomb that is threatening a two-state solution.”

The two nations have agreed to normalize relations, allowing travel, commerce and, eventually, the opening of diplomatic offices. Representatives of both countries will meet soon to begin signing agreements, a joint statement said.

Netanyahu, appearing before reporters in Jerusalem, hailed the agreement as the greatest advance toward peace in the Arab world in decades. The deal was struck, he said, without Israel having to give up territory that it has effectively controlled for more than 50 years of conflict with the Palestinians.

“Who would have ever dreamed there would be a peace agreement with an Arab country without our returning to the 1967 borders,” Netanyahu said. “Israel and the UAE are two of the most advanced countries in the world, and together we can transform the region.”

Like Trump, he predicted the day’s breakthrough would lead to others.

“I am confident in saying that there will soon be more Arab countries joining in the circle of peace,” he said.

But questions surround how long Israel will halt plans to annex parts of the West Bank.

Netanyahu, pressed on this part of the deal, said that he agreed to it at the request of the White House but that he did not consider the plan dead.

“I am committed to sovereignty,” he said, using the Israeli term for annexation. “I did not give up on the settlements.”

Most of the focus on the Middle East peace effort led by Jared Kushner, Trump’s adviser and son-in-law, has been on a vision for economic betterment but limited autonomy for the Palestinians. Palestinian opposition to the Trump effort has foreclosed negotiations between Israel and Palestinian Authority President Mahmoud Abbas.

But the larger aim of Kushner’s plan was always for Israel to forge new economic partnerships with many of its neighbors, especially Sunni Arab states that share the U.S. and Israeli view of Iran as an enemy.

Kushner dismissed the outrage among Palestinian leaders over the deal and their lack of involvement.

“They have a fairly predictable response that we’ve seen time and time again to all types of things that help make their people’s lives better,” he said during a news briefing at the White House. “Let’s just focus on the facts of what’s happening, and let’s focus on how to push things forward.”

Gargash said at a news conference that delegations from the two countries will meet in coming weeks to sign agreements in areas such as investment, direct flights, security and cooperation in fighting the coronavirus before eventually culminating with establishing embassies.

Arab leaders had privately warned Trump that they could not agree to future economic or diplomatic ties with Israel if Israel took over land now considered Palestinian. The warning was made publicly in an essay in a major Israeli newspaper written by the UAE ambassador to the United States.

“Annexation will certainly and immediately upend Israeli aspirations for improved security, economic and cultural ties with the Arab world and with UAE,” Yousef Al Otaiba wrote, in Hebrew.

He then presaged Thursday’s announcement by outlining the potential for common ground.

“With the region’s two most capable militaries, common concerns about terrorism and aggression, and a deep and long relationship with the United States, the UAE and Israel could form closer and more effective security cooperation,” he wrote.

Trump said that he has lowered tension in the Middle East, although his withdrawal from the Iran nuclear deal has led other nations to accuse the United States of raising tensions rather than lowering them.

“When I was elected, they said the war will start with somebody within days, and I’ve kept us out of war,” Trump said.

Trump predicted a White House signing ceremony within weeks. Presidents Jimmy Carter and Bill Clinton held such ceremonies when Israel normalized relations with Egypt and Jordan.

Biden praised the deal and sought to portray it as the work of several administrations, as opposed to Trump’s success alone.

“I personally spent time with leaders of both Israel and the UAE during our administration building the case for cooperation and broader engagement and the benefits it could deliver to both nations, and I am gratified by today’s announcement,” he said in a statement.

The agreement sidelines the Palestinians, whose claim to the land where Israel was established in 1948 underlies the ­Arab-Israeli conflict of the decades since.

That such a potentially consequential deal could be reached without the involvement of the Palestinians raised long-standing fears that Arab states of the Persian Gulf were ready to work toward better business and political relations with Israel without gaining meaningful concessions.

Veteran Palestinian leader Hanan Ashrawi said in a tweet, “May you never be sold out by your ‘friends.’ ”

Hamas spokesman Fawzi Barhoum in the Gaza Strip also condemned the plan for rewarding Israel: “The declaration of normalization between Israel and the UAE is a free reward for the occupation for its crimes and violations against the Palestinian people.”

Netanyahu, facing legal problems and protests over his handling of the coronavirus pandemic, calculated that the political drawbacks of setting aside annexation would be offset by a chance to claim the mantle of peacemaker.

The agreement, which Netanyahu kept even from his own Foreign Ministry, was quickly greeted in Israel as the latest in a career full of political escape acts.

The prime minister had made his ambitions to annex Jewish settlements in the West Bank the clarion call of three straight election campaigns. But the plan had largely stalled in the face of mounting international objections and hesitations in the White House, leaving Netanyahu stuck between an angry international community and frustrated settlers.

In trading a fading annexation plan for a coveted normal relationship with an Arab neighbor, he converted dross into a diplomatic breakthrough likely to thrill most Israelis. Even some settler leaders applauded the deal.

“Postponing the application of Israeli law is a fair price to pay for a peace agreement with the United Arab Emirates,” said Oded Revivi, mayor of the settlement of Efrat.

Others were infuriated.

David Elhayani, head of the settler umbrella group Yesha, accused Netanyahu of “betraying” some of his most loyal political supporters.

“He has deceived half a million residents of the area and hundreds of thousands of voters,” Elhayani said.

Netanyahu, in his news conference, denied that he had “given up on the settlements.” The agreement calls for the “suspension” of annexation, not its end.

Kushner, too, refused to be pinned down by reporters on how long the “suspension” was likely to last.

“Sometime between a long time and a short time,” he said. “That’s what temporary means.”

At news conference later in the day, Trump deferred questions about annexation to David Friedman, the U.S. ambassador to Israel, who has close ties with settlement groups. Friedman said the issue should be considered moot during the time it could take to “give peace every chance.”

Pressed about what that means, Friedman added, “It’s off the table now, but it’s not off the table permanently.”

Hendrix reported from Jerusalem. Karen DeYoung and Souad Mekhennet in Washington, Paul Schemm in Dubai, Hazem Balousha in the Gaza Strip and Sufian Taha in Jerusalem contributed to this report.