Paraguay announced Wednesday it would immediately move its embassy in Israel out of Jerusalem and back to Tel Aviv, less than four months after opening the new mission.

The move presents an embarrassing diplomatic setback for Israel, which had hoped to build on the momentum started by the U.S., Guatemala and Paraguay, which all moved their embassies to Jerusalem in May. In response to Paraguay's decision, Israel said it was shuttering its embassy there, warning that ties between the countries would be "strained" by the decision.

Paraguay's Foreign Minister Luis Alberto Castiglioni said at a news conference that he hoped "the friends of Israel will not be bothered" by his nation's reversal and expressed hope for "excellent ties of friendship and cooperation" with both "the states of Israel and Palestine."

Former President Horacio Cartes opened the new embassy in Jerusalem on May 21, giving a diplomatic victory to Israeli President Benjamin Netanyahu. It came only days after the U.S. and Guatemala took similar steps.

But the measure was widely criticized within Paraguay, and Castiglioni described it as "unilateral, visceral and without justification."

New Paraguayan President Mario Abdo Benitez had opposed the switch even before taking office on Aug. 15.

"One of the most complex components of the conflict (between Israel and the Palestinians) is the status of Jerusalem," Castiglioni said, and Paraguay believes it should be negotiated between the parties involved — a position still held by most nations.

The about-turn prompted Israel to announce the drastic step that it was closing its embassy in Asuncion and warning that Paraguay's decision will worsen ties between the countries.

"Israel views very seriously Paraguay's exceptional decision which will strain the relations between the countries," said a statement from Prime Minister Benjamin Netanyahu's office.

The Palestinians, who were infuriated by the embassy moves, particularly America's, celebrated Paraguay's reversal. In a statement, the Palestinian Foreign Ministry said Paraguay had pledged two weeks ago to return the embassy to Tel Aviv during a visit by Foreign Minister Riad al-Malki to the country.

The statement said Malki "expresses his appreciation and gratitude to the Paraguayan president and his foreign minister for moving the embassy back and for their commitment to international law."

The Palestinians want Jerusalem's eastern sector as capital of a hoped-for state, while Israel sees the entire city as its eternal, undivided capital. Israel captured east Jerusalem in the 1967 Mideast war along with the Gaza Strip and the West Bank, territories the Palestinians want for their future state.

Most countries have maintained their embassies in Tel Aviv so as to not prejudge the outcome of peace talks between Israel and the Palestinians.

The Trump administration's decision to move the embassy flew in the face of that international consensus and it followed its recognition months earlier of Jerusalem as Israel's capital, another step the Palestinians fiercely opposed.

Castiglioni acknowledged that "some Arab governments expressed their concern to us" after the embassy was shifted to Jerusalem.

He stressed an intention to retain good ties with Israel, saying, "We are friends and historic allies."

___

Associated Press writers Tia Goldenberg in Jerusalem and Mohammed Daraghmeh in Ramallah, West Bank, contributed.