Otto Perez Molina was headed back to court on Friday after spending his first night as an ex-president in military custody. Perez Molina's jailing followed a historic day in which he resigned and Guatemala's Congress swore in Vice President Alejandro Maldonado to serve the remainder of his term.
The judge hearing a corruption and fraud investigation against Perez Molina ordered the former president held in custody until the hearing reconvened Friday morning. Perez Molina left the court under heavy police guard and was later seen entering a military barracks in the capital.
Shortly after taking the oath of office Thursday, Maldonado demanded that ministers and top officials submit their resignations so he could form a transition government and promised an honest and inclusive administration.
Reaching out to protesters who took to the streets against the country's entrenched corruption, he vowed to leave "a legacy of honesty" and restore faith in Guatemala's democracy in his brief few months in office.
"You can't consider your work done," Maldonado said in remarks aimed at all those demanding change. "In what is left of this year, there must be a positive response."
The unprecedented political drama was the climax of a week in which Perez Molina was stripped of his immunity from prosecution, deserted by key members of his Cabinet and saw his jailed former vice president ordered to stand trial — all just days before Sunday's election to choose his successor.
Perez Molina appeared in court Thursday to face accusations that he was involved in a scheme in which businesspeople paid bribes to avoid import duties through Guatemala's customs agency. He is the first Guatemalan president to resign.
Judge Miguel Angel Galvez ordered Perez Molina's detention citing a need to "ensure the continuity of the hearing" and guarantee the ex-president's safety.
Perez Molina, 64, has steadfastly maintained his innocence and reiterated his willingness to face the investigation head-on.
"I have always said I will respect due process," he said. "I do not have the slightest intention of leaving the country."
Earlier he told The Associated Press during a break in the court proceedings that the process had been "very hard, very difficult" and that he could have derailed the probe but did not.
"I had things I could have done," Perez Molina said. "I could have replaced the prosecutor, I could have dug in."
Uncovered by prosecutors and a U.N. commission known as CICIG, which is investigating criminal networks in the country, the customs corruption scandal involved a scheme known as "La Linea," or "The Line." It is believed to have defrauded the state of millions of dollars.
A growing protest movement brought together Guatemalans from all walks of life, from business leaders to Roman Catholic Church officials, to demand that Perez Molina step down as the fraud probe expanded to implicate more officials.
Ex-Vice President Roxana Baldetti's former personal secretary was named as the alleged ringleader and is a fugitive. Baldetti, who resigned May 8 and is now jailed and facing charges, also maintains her innocence.
Analysts said the events of the last few days have dealt a key blow to corruption in the country and boosted the rule of law.
"The main factor is the existence of CICIG working with the Guatemalan prosecutor to make the (prosecutor's office) a strong and capable institution," said Cynthia Arnson, director of the Latin American Program at the Wilson Center in Washington.
"The popular protests were a product of the revelations of the last months, but without an independent body with real capacity to investigate and come up with evidence, we wouldn't see the same kind of scenario unfolding," Arnson said.
Maldonado, a 79-year-old conservative former high court justice, has served as Guatemala's foreign minister and in ambassadorial posts.
He also formerly headed Guatemala's highest court where he presided over much-debated decisions like the one not to extradite former dictator Efrain Rios Montt to face genocide, torture and terrorism charges in Spain.
He proposed three candidates to replace him as vice president: Raquel Zelaya, president of a conservative think tank and signatory to 1990s peace accords that ended Guatemala's civil war; Juan Alberto Fuentes Soria, a former university provost; and Gabriel Medrano, another academic and ex-Supreme Court president.
The shortlist will be sent to Congress on Monday.
Maldonado will likely remain in office until the winner of upcoming elections is inaugurated Jan. 14, 2016.
The U.S. Embassy in Guatemala said in a statement that it would work with the new president and congratulated the Central American nation for handling the crisis peacefully. U.N. Secretary-General Ban Ki-moon said he was aware of Guatemalans' desire to strengthen institutions and the rule of law, and called for calm during Sunday's election.
The first round pits a wealthy businessman and politician against 13 other candidates, including a comedian with no political experience, a former first lady and the daughter of Rios Montt, who now faces a genocide trial in his home country. If none of the candidates reaches 50 percent, a runoff will be held Oct. 25.