Updated

Guatemala's move of its embassy in Israel from Tel Aviv to Jerusalem on Wednesday was the culmination of longstanding friendly ties between the two nations.

It's also seen by many as an attempt to curry favor with the administration of U.S. President Donald Trump, which two days earlier inaugurated its own embassy in disputed Jerusalem. Perhaps most important, it is considered an easy domestic victory for Guatemalan President Jimmy Morales, whose government is beset by economic problems, gang violence and corruption allegations that continue to dog him and those close to him.

"I think it's driven much more by domestic factors in Guatemala, the right-wing evangelical support for both Morales and their support for the state of Israel," said Michael Allison, a political scientist specializing in Central America at the University of Scranton in Pennsylvania.

"Morales and many in the Guatemalan political and economic elite were in favor of moving their embassy," Allison said. "They would not have done it without the U.S. doing it first, but it is not as if they were doing something that went against what they wanted to do."

Israel has always claimed Jerusalem as its capital, but other countries put their embassies in Tel Aviv because of the holy city's contested status — Palestinians want east Jerusalem as the capital of their future state. This week's embassy moves came amid protests in Gaza that saw nearly 60 Palestinians killed by Israeli troops during clashes along the border.

Guatemala became the second country to recognize the Israeli state, in 1948, and it was the first to put its embassy in Jerusalem, in 1956. It shifted its legation to Tel Aviv 24 years later after the Israeli parliament declared Jerusalem the eternal and indivisible capital in contravention of a U.N. resolution.

The close relationship continued during Guatemala's 1960-1996 civil war. When the U.S. banned arms sales over military human rights abuses during the 1978-1982 government of Gen. Romeo Lucas Garcia, Israel provided intelligence systems and Israeli-made arms such as Galil rifles.

Even before the embassy move, Guatemala's congress began pushing for closer relations and in April declared that Guatemala will observe each May 14 as a "national day of friendship with Israel."

"It is the right thing to do," Morales has said of moving the embassy.

Just as for Trump, moving Guatemala's embassy plays well with an important part of the electoral base of Morales, an evangelical Christian whom like-minded voters helped usher into office in 2015. At least one evangelical pastor accompanied Morales to Israel for Wednesday's inauguration.

"They (the Evangelical Alliance) exert some level of pressure over him and see the switch as positive," said Enrique Godoy, a Guatemalan political analyst.

That kind of domestic win comes as Morales is under increasing pressure due to corruption investigations in Guatemala that have picked up steam in recent years, even leading to the imprisonment of former President Otto Perez Molina.

On Tuesday night, investigators revealed new details of a probe against Morales relating to purported illicit campaign financing and said the material is sufficient to again seek to have his immunity from prosecution lifted. Morales has denied wrongdoing.

A U.N.-sponsored commission in Guatemala has been a key driver of that and other corruption investigations, along with the country's crusading top prosecutor. Morales has sought — so far unsuccessfully — to expel the commission's chief and persuade the United Nations to reign it in.

The U.S. has been a strong supporter of the anti-corruption agenda. "Guatemala's government has been looking for ways to diminish that support," said Adriana Beltran, director for citizen security at the Washington Office on Latin America, a U.S.-based think tank.

Guatemala is also a recipient of U.S. security and development aid, and it stands to be hurt if the United States deports Guatemalan migrants in mass numbers.

So far there is no indication that Guatemala has received anything from Washington in a quid pro quo, though Trump expressed appreciation for Morales' support on the embassy issue in February when the two met in Washington.

Moving its embassy certainly didn't hurt Guatemala's standing in the eyes of pro-Israel groups and some U.S. lawmakers such as Sen. Marco Rubio, a Florida Republican who recently put a hold on $6 million in U.S. funding for the U.N. anti-graft commission over an unrelated issue.

Manuel Villacort, a Guatemalan political sociologist, said part of Morales' calculus is likely to seek international allies due to difficulties at home. But he predicted that while the strategy may have yielded a quick win, over time Morales will still have to do more to solve core problems such as violence and corruption.

"This is a relief for him, it gives him oxygen, but only in the short term," Villacort said.

Elsewhere in Latin America, Honduras and Paraguay have also announced intentions to move their embassies to Jerusalem, though neither has given a timetable. Some have speculated Honduras hoped to win an extension in temporary protected migration status for tens of thousands of its citizens living in the United States, but the Trump administration announced an end to those protections in early May.

___

Associated Press writer Sonia Perez D. reported this story in Guatemala City and AP writer Peter Orsi reported from Mexico City.