LIMA, Peru — Keiko Fujimori and Roberto Sánchez officially advanced to a presidential runoff in Peru, more than four weeks after voters went to the ballot box, setting up a runoff next month between two candidates with starkly different ideological viewpoints.

The proclamation by the country’s electoral authority caps a turbulent period of bitter disputes, razor-thin margins and institutional chaos.

The matchup sets up a contest that could steer the country in sharply different directions — toward Fujimori’s hard-line conservatism or the leftist Sánchez’s push to overhaul the constitution and give the state a bigger role in the economy.

With 100% of the ballots counted, Fujimori, a four-time presidential hopeful, topped the 35-candidate field with 17% of the vote. Sánchez, a leftist congressman, narrowly secured the second spot with 12% — edging out far-right businessperson and former Lima mayor Rafael López Aliaga by just 21,239 votes.

López Aliaga, widely known by his nickname “Porky,” has rejected the results, calling them a “gigantic fraud.”

On the April 12 Election Day, dozens of polling stations in Lima, the capital and a stronghold for López Aliaga, were unable to open because of delays in the delivery of election materials, prompting the authorities to extend voting into the next day.

While international observers said there was no evidence of fraud, the backlash caused a top electoral official to resign amid police raids on election offices. López Aliaga led several protests in Lima to demand the election be annulled or extended.

Then on Tuesday, the attorney general said prosecutors were charging Sánchez with document forgery and false statements related to his party’s finances from 2018 to 2020, seeking a five-year prison sentence and his permanent disqualification from public office.

Sánchez denied the charges, saying they rely on evidence previously dismissed by local courts.

“I’m calm, serene,” Sánchez told journalists Tuesday. “I reaffirm my correct and respectful conduct within the law. I will prove them wrong.”

The first-round results set the stage for a polarizing June 7 election. Fujimori is among the best-known and least-liked figures in Peruvian politics. The daughter of former president Alberto Fujimori, who died in 2024, Fujimori has built her career on his mixed legacy: a government credited with defeating insurgents and stabilizing the economy, but also criticized for corruption and human rights abuses.

She narrowly lost three previous runoff elections and remains a dominant presence through her party, Popular Force, which is expected to control the largest voting bloc in Congress. Critics say she has used her political alliances and influence in the Legislature to concentrate power, weaken checks and balances, and undermine independent institutions.

While Fujimori has acknowledged playing a role in the power struggles that gave Peru nine presidents in the past 10 years, she positions herself as a bulwark against ineffective left-leaning governments and has called for tougher security measures as crime and corruption dominated voter concerns.

Sánchez has cast himself as the political heir to former President Pedro Castillo, a leftist provincial outsider who rose to power in 2021 before being impeached and arrested in 2022 after a failed effort to dissolve Congress. At least 49 civilians were killed in the protests that followed.

Sánchez, who was trade and tourism minister under Castillo, campaigned in rural provinces and urban shantytowns often overlooked by traditional parties, where voters remain outraged over Castillo’s downfall and the deadly crackdown on the ensuing protests.

In the southern region of Puno days before the election, many voters said they were simply voting for “JP” — the Spanish acronym for Sánchez’s party, Together for Peru.

“The people chose him to govern. What did they do? They removed him for no reason,” said Luzmila Mamani, who sells children’s toys in a crowded market of Juliaca, Puno’s largest city. “The people who tried to protest were killed like fish.”