Former Guatemalan President Otto Perez Molina will face prosecution for his alleged role in a customs fraud scandal that has rocked the country for months, a federal judge announced Tuesday. The decision comes just days after Perez Molina resigned from office amid growing national outrage over corruption in the government.

Judge Miguel Angel Galvez said there was “sufficient evidence” Perez Molina was connected with a bribery scandal known as “La Linea,” in which customs officials allegedly charged lower fees to select importers in exchange for kickbacks, Guatemala’s El Periodico reported. Investigators said the president likely received as much as $3.7 million in bribes from the scheme. Perez Molina now faces charges of conspiracy, customs fraud and passive bribery, and will stay in detention until his trial begins to ensure he does not evade the courts.

The decision is considered another victory for thousands of Guatemalans who have taken to the streets every week since April to demand Perez Molina step down and face the courts over his alleged role in the scandal. Once proceedings begin, Perez Molina will be the highest-level Guatemalan official to stand trial in the fraud scheme, which already has led to several other officials’ arrests and resignations in one of the biggest political upheavals the Central American country has seen in years. Former Vice President Roxana Baldetti also faces trial for her alleged role in the corruption network. Investigators have pointed to both Perez Molina and Baldetti as the ringleaders of the operation.

Perez Molina has consistently denied any involvement with the scandal since a United Nations-backed investigative committee uncovered details of the scheme earlier this year. He resigned his post as president last week after Guatemala’s Congress stripped him of presidential immunity, and was jailed just hours later. Vice President Alejandro Maldonado assumed the presidency and will hold the office until an elected successor takes over in January. Guatemala held its first round of national elections Sunday. Comedian Jimmy Morales led the pack of contenders. A runoff election is scheduled for late October.