Associated Press

GUATEMALA CITY — Guatemala’s highest court ruled Tuesday that President Jimmy Morales cannot expel the head of a U.N. anti-corruption commission from the country.

The president had issued his expulsion order for Ivan Velasquez early Sunday, two days after Velasquez and Guatemala’s chief prosecutor announced they were seeking to lift Morales’ immunity from prosecution in order to investigate alleged illegal campaign financing.

But the Constitutional Court, the country’s highest tribunal, quickly suspended the order Sunday, and on Tuesday the justices negated Morales’ order declaring Velasquez persona non grata. The court ruled the order was issued improperly.

The U.N. panel and local prosecutors have built popularity among many Guatemalans over the last decade by attacking the corruption long endemic in Guatemala, including helping force the previous president from office two years ago.

Morales’ order was met with anger from many Guatemalans, and it drew a barrage of criticism from the international community, including the United States. Earlier Tuesday, U.N. Secretary-General Antonio Guterres said he was shocked by the president’s action and expressed full support for Velasquez.

Although he initially defended the expulsion order, Morales softened his stand Monday and said he was willing to abide by court decisions on his action.

“People of Guatemala, as president of the republic I have and will respect the decisions of the other branches of government. The rule of law should always prevail,” he wrote in his Facebook account.

On Tuesday, Morales made his first public appearance since the crisis exploded, meeting with loyal mayors who voiced their support for him. The government distributed a video clip through its Twitter account that was just 14 seconds of mayors applauding Morales.

The mayors may have some self interest in seeing Velasquez go. The U.N. commission issued a report in 2015 saying that drug trafficking financed many political campaigns in Guatemala, especially in mayoral races.

Velasquez and chief prosecutor Thelma Aldana also have targeted several political parties, including Morales’ National Convergence Front. Prosecutors allege that about $825,000 of financing for his 2015 campaign was hidden and other expenditures had no explainable source of funding.

With the Constitutional Court’s ruling now out of the way, Guatemalans are watching the Supreme Court as it considers the prosecutors’ request to strip Morales’ immunity.