Guatemala has fallen into deep political crisis after the president declared the United Nations-backed anti-corruption chief investigating him and his party persona non grata, only to have the expulsion order blocked hours later by the country’s constitutional court.

Jimmy Morales, a former comedian who was elected president two years ago after the previous government was toppled by corruption charges, was left fighting for his political survival – and freedom – on Sunday after the failed attempt to oust head of the International Commission against Impunity in Guatemala (CICIG), Iván Velásquez.

Morales announced the expulsion of the respected Colombian prosecutor via a video posted on his Twitter account in the early hours of Sunday morning. He also announced that he was firing the foreign minister for failing to carry out the expulsion, replacing him with an ally who is under investigation for illegal adoptions.

The announcements were made less than 48 hours after Velásquez and Thelma Aldana, the attorney general, asked the court to strip Morales of his political immunity in order to proceed with charges linked to illegal campaign funds allegedly received by his political party the National Convergence Front (FCN) during the 2015 election.