A Guatemalan judge has ordered former President Otto Perez Molina to remain in detention as a court considers whether to try him on corruption charges.
Perez Molina resigned Thursday, hours after lawmakers stripped him of immunity from prosecution in a corruption scandal dubbed "The Line," named for wiretapped telephone calls that appear to implicate the president.
Perez Molina wrote in his resignation letter that he had a clear conscience. "My commitment to the people of Guatemala is to submit with all integrity to the due process of law and refute the accusations against me," he said.
But the ex-president scarcely looked up in a courtroom Thursday as prosecutors played recordings of the bugged phone calls that they said showed he accepted bribes from importers who wanted to avoid customs duties.
His vice president and six cabinet ministers had already resigned. A judge will decide whether to put Perez Molina on trial.
Thousands of Guatemalans filled the streets when news of the president's resignation spread. They had been protesting for months, demanding he step down.
Perez Molina was elected in 2011 on an anti-corruption pledge. But Guatemala continues to be one of Latin America's most impoverished countries.
A government spokesman said the United States supports Perez Molina's decision to resign. "We commend the people of Guatemala and their institutions for the manner in which they have dealt with this crisis and continue to underscore our support for Guatemala's democratic and constitutionally institutions," spokesman Josh Earnest said.
Perez Molina resigned just three days before a presidential election in which he was constitutionally ineligible to run.
Vice President Alejandro Maldonado took the oath as president late Thursday. He will hold power until an elected president is sworn in in January.