President Otto Perez Molina resigned Thursday after a judge issued an order to detain him in connection with a corruption scandal.

Here's what to look for as the case moves forward.

___

WHAT ARE THE ALLEGATIONS AGAINST PEREZ MOLINA?

Prosecutor Thelma Aldana has said the president is suspected of illicit association, fraud and receiving bribe money in connection with a conspiracy that is believed to have bilked the government out of millions of dollars. Officials allegedly took bribes in exchange for letting businesses evade import duties through the customs agency. Former Vice President Roxana Baldetti is already in jail awaiting trial on similar accusations. Both deny any wrongdoing.

___

WHAT HAPPENED TO PEREZ MOLINA AFTER HE LEFT OFFICE?

The ex-president appeared Thursday at a court where a judge began hearing the case against him. As it adjourned for the day, the judge ordered Perez Molina held in custody overnight at a military barracks to guarantee the continuity of the proceedings and for the former leader's own protection. The hearing is set to resume Friday morning.

___

WHO REPLACED HIM AS PRESIDENT?

Vice President Alejandro Maldonado was sworn in as president shortly after Congress accepted Perez Molina's resignation. Maldonado, a conservative lawyer and former Constitutional Court judge, became vice president this year when Congress picked him from a shortlist of Perez Molina nominees. He replaced Baldetti, who resigned May 8 because of the corruption scandal. Maldonado would presumably remain in office until the winner of upcoming elections is inaugurated Jan. 14, 2016. He has nominated three candidates to become the next vice president; the shortlist will be sent to Congress on Monday for lawmakers to pick one.

___

HOW WILL THE LEGAL CASE AGAINST PEREZ MOLINA PROCEED?

Timetables for criminal prosecutions are spelled out by Guatemalan law. Prosecutors would have three months to present evidence for a judge to order a trial. However there are often significant delays due to legal maneuvers, and it usually takes about a year to bring a suspect to trial. That could differ for Perez Molina depending on whether his case is linked to that of other suspects in the corruption probe. The courts could also freeze his assets, as has happened with Baldetti.

___

WHAT DOES IT ALL MEAN FOR SUNDAY'S ELECTION?

Not much, apparently. Political analyst Oscar Pelaez Almengor says the legal process against Perez Molina has "no effect" on the vote because elections are mandated by the constitution and overseen by the Supreme Electoral Court, not the presidency. So it looks highly unlikely that protesters' demands to postpone the vote will be met. However widespread anger over corruption and dissatisfaction with the current candidates could lead many to abstain or cast spoiler votes, undermining the eventual winner's mandate.