LIMA, Peru — His parents were peasant farmers who never learned to read. As a child, he walked hours to school, before becoming a teacher himself. Then, two months ago, he burst onto Peru’s national political scene as an anti-establishment candidate with a captivating call to the ballot box: “No more poor people in a rich country.”
And on Monday night, more than a month since the second round of the presidential election, officials declared Pedro Castillo, 51, the next president of Peru. In a very close vote, he defeated Keiko Fujimori, the daughter of a right-wing former president and herself a towering symbol of the Peruvian elite.
Mr. Castillo’s victory, however narrow the margin, is the clearest repudiation of the country’s establishment in 30 years. It was also the third straight loss for Ms. Fujimori.
Mr. Castillo, a socialist, will become Peru’s first left-wing president in more than a generation, and its first to have lived most of his life as a “campesino” — or peasant — in a poor Andean region.
In a victory speech from a balcony in downtown Lima, with his supporters chanting “yes, we could” in the streets below, Mr. Castillo promised to work for all Peruvians.
“I call for the broadest unity of the Peruvian people,” Mr. Castillo said. “Together we’ll share this struggle and this effort to make a more just, dignified and united Peru.”
Addressing Ms. Fujimori, he added: “Let’s not add more obstacles to moving this country forward.”
The announcement of his victory came after a more than monthlong effort by Ms. Fujimori to have about 200,000 votes tossed out in areas where Mr. Castillo won by a landslide, an action that would have disenfranchised many poor and Indigenous Peruvians.
Shortly before authorities declared Mr. Castillo president-elect, Ms. Fujimori said in a televised speech Monday evening that she would acknowledge the results out of respect for the law, but called his pending proclamation as president-elect “illegitimate” and insisted again that his party had stolen thousands of votes from her.
She called on her supporters to enter into “a new phase” in which they remained politically active to “defend the Constitution and not let communism destroy it to take power definitively.” She added: “We have the right to mobilize as we have been doing and we should continue to do — but peacefully, and within the law.”
Ms. Fujimori accused Mr. Castillo’s supporters of tampering with tally sheets across the country. But in the weeks that followed the vote, no one came forward to corroborate her central claim: that the identities of hundreds of poll workers had been stolen and their signatures falsified.
The dispute brought thousands of the two candidates’ supporters to the streets of Lima in dueling protests since the election. Many of Mr. Castillo’s supporters from rural regions spent weeks camping out to await the official proclamation that he had won.
In the end, the election authorities dismissed all requests by Ms. Fujimori’s party to discount ballots from an official tally that put Mr. Castillo 44,263 votes ahead, with a total of 8,836,380 votes to Ms. Fujimori’s 8,792,117.
“Votes from the highest mountain and farthest corner of the country are worth the same as votes from San Isidro and Miraflores,” Mr. Castillo told throngs of supporters last month, referring to two upscale districts in Lima.
“No more making fun of workers, peasant leaders or teachers,” Mr. Castillo said. “Today we must teach the youth, the children, that we are all equal before the law.”
Many of Mr. Castillo’s supporters said they had voted for him in the hope that he would reform the neoliberal economic system put in place by Ms. Fujimori’s father, Alberto Fujimori. That system, they said, delivered steady economic growth and tamed inflation, but ultimately failed to help millions of poor people.
The painful disparity became more glaring still when the coronavirus struck. The virus has ravaged Peru, which has the highest documented per capita Covid-19 death toll in the world. Nearly 10 percent of its population has been pushed into poverty in the last year.
“Thirty years of the big businessmen getting richer — and in Peru we have more poverty,” said Manuel Santiago, 64, a shop owner who voted for Mr. Castillo. “We’re tired of the same thing.”
But Mr. Castillo now faces enormous challenges.
Corruption and political vendettas have convulsed the nation in recent years, and the country has cycled through four presidents and two congresses in the past five years.
Perhaps most critically, Mr. Castillo, who has never held office, lacks the political experience and popularity that buoyed other left-wing leaders who took power in South America.
“As a political figure, he has a lot of problems that lead to instability,” said Mauricio Zavaleta, a Peruvian political scientist.
In Bolivia in 2005, Evo Morales, who became the country’s first Indigenous president, won in the first round with more than 50 percent of the vote, he pointed out. In Venezuela in 1998, Hugo Chávez “was an electoral storm.” Luiz Inácio Lula da Silva, in Brazil in 2002, and Rafael Correa, in Ecuador in 2006, were established figures first elected president by wide margins.
“Castillo is not part of those phenomena,” Mr. Zavaleta said.
Moreover, he said, Mr. Castillo is unlikely to have the support of Congress, the military, the media, the elite or a large political movement. “He simply doesn’t have the muscle to carry out the ambitious reforms he’s proposed,” Mr. Zavaleta said.
Mr. Castillo has promised to overhaul the political and economic system to address poverty and inequality, and to replace the current Constitution with one that would increase the state’s role in the economy. He campaigned wearing a traditional farmer’s hat, and sometimes appeared on horseback, or dancing with voters.
“He’s someone who doesn’t have to go visit a village to be in touch with people and get to know their problems, because he comes from a village,” said Cynthia Cienfuegos, a political affairs specialist with the Peruvian civil society group Transparencia.
“His triumph reflects a demand for change that’s been postponed for a long time,” she said.
Mr. Castillo grew up in Peru’s northern highlands, and as a young man, he cleaned hotel rooms in Lima. After attending university at a city in northern Peru, he chose to move back to the same highland province where he grew up to run a school without running water or a sewage system.
After becoming a union activist for schoolteachers, Mr. Castillo helped organize a 2017 strike to push for better salaries.
Then he largely disappeared from public view — until this year, when he joined with a Marxist-Leninist party to launch a bid for the presidency and emerged as the surprise leader, if by a narrow margin, in the first round of the race.
As a candidate, Mr. Castillo traveled the country widely to hear from voters, often carrying a giant pencil under his arm to remind them of his promise to ensure equal access to a quality education.
He could hardly be more different from Ms. Fujimori, who grew up in privilege, becoming Peru’s first lady at age 19, after her parents had separated.
Like Mr. Castillo, her father swept into office as an outsider at one of the most difficult points in the country’s history. While Mr. Fujimori was initially credited with beating back violent leftist insurgencies in the 1990s, he is now scorned by many as having been a corrupt autocrat.
Mr. Fujimori was convicted in a series of trials on corruption and other charges, including directing the activities of a death squad. He has been in prison, with a brief interruption, since 2007.
His daughter, too, now faces prosecution, accused of running a criminal organization that trafficked in illegal campaign donations during a past presidential bid. She denies the charges. If found guilty, she could be sentenced to as long as 30 years in prison.
Mr. Castillo, who will take office on July 28, the 200th anniversary of Peru’s independence from Spain, has portrayed himself as a clean start for a country with a long history of cronyism and corruption.
“Let’s end this bicentennial, which has had a lot of problems along the way, and open the door so the next bicentennial is full of hope, with a future and a vision for a country in which we all enjoy and eat from the bread of the country,” Mr. Castillo told a plaza full of supporters last month. “Let’s take back Peru for Peruvians.”