Accused of being the mastermind behind a corruption scheme to defraud the customs department, Guatemalan President Otto Pérez Molina has resigned from the presidency.

A warrant has been issued for the exiting leader. As previously reported, Pérez Molina, who has continually denied any connection to the scandal, was stripped of his immunity from prosecution and barred from leaving the country on Tuesday.

The scandal has already greatly shaken Pérez Molina's administration as former Vice President Roxana Baldetti was jailed for her alleged role in the scheme and several cabinet ministers have withdrawn their support for the president. The accusations of corruption revolve around businesses paying bribes to government officials and custom officers in order to get out of paying import duties.

As reported in The New York Times, Pérez Molina addressed the reasoning behind his resignation in a letter to congress in which he said he was leaving office in order to “face justice and resolve my personal situation.”

Vice President Alejandro Maldonado is expected to assume the presidency for the remainder of Pérez Molina’s term, which would have ended in January. Maldonado was chosen to replace former Vice President Roxana Baldetti, who, due to her connection to the scandal, resigned on May 8.

The president's resignation has occurred days before the general election is set to take place on Sunday.

Jorge Ortega, a spokesman for Pérez Molina, said the president submitted his resignation at midnight on Wednesday. Pérez Molina’s resignation will not, however, be effective until Congress accepts it and names a new president.

Formal charges have yet to be filed. The president is expected to now appear before a judge to face accusations of illicit association, fraud and receiving bribe money. César Calderón, the president’s attorney, informed the Associated Press that Pérez Molina will appear voluntarily as soon as they have confirmed that the order has been issued.