GUATEMALA CITY - Guatemalan President Otto Perez Molina has resigned hours after a judge issued a warrant for his arrest.
Prosecutors accuse Mr Perez Molina of masterminding a scheme to defraud the customs service of millions of dollars. He denies the allegations.
On Tuesday, Congress stripped him of his immunity from prosecution, a first in the Central American nation.
A spokesman said Mr Perez Molina had decided to step down to "confront the proceedings against him".
Mr Perez Molina's resignation comes just days before Sunday's presidential election, in which he was barred from standing under constitutional rules.
Vice-President Alejandro Maldonado is expected to govern until the new president is sworn in on 14 January.
Mr Maldonado has only been in the post since mid-May, when his predecessor Roxana Baldetti resigned.
Ms Baldetti is accused of involvement in the same corruption scheme which Mr Perez Molina allegedly masterminded.
Investigators say the scheme, dubbed La Linea, or The Line, involved businesses paying bribes to government officials and custom officers in return for being allowed to evade import duties.