Leftist Pedro Castillo was sworn in as Peru's fifth president in three years Wednesday on the 200th anniversary of the country's independence, promising an end to corruption and a new constitution.

The 51-year-old rural schoolteacher, who has vowed to upend a quarter-century of neo-liberal government, enters the job with a lengthy to-do list: tame the coronavirus epidemic, reactivate a flagging economy and end years of political turmoil.

"I swear by the people of Peru for a country without corruption and for a new constitution," he declared before Congress, coming back to a campaign promise to change Peru's free market-friendly founding law.

The existing charter is a relic of ex-president Alberto Fujimori, serving jail time for corruption and crimes against humanity, and father of Castillo's main presidential rival, right-wing populist Keiko Fujimori.

Pedro Castillo was proclaimed Peru's president-elect six weeks after a polarizing vote of which the results were delayed by claims of electoral fraud from his right-wing rival, Keiko Fujimori
Pedro Castillo was proclaimed Peru's president-elect six weeks after a polarizing vote of which the results were delayed by claims of electoral fraud from his right-wing rival, Keiko Fujimori AFP / Gian MASKO

Insisting Peru could not "remain a prisoner" of the 1993 constitution, Castillo said he would send a bill to parliament with a view to organizing a referendum on replacing it.

Castillo's Free Peru party does not enjoy a majority in a fragmented congress, holding 37 of the 130 seats.

He was declared the election victor on July 19, more than six weeks after a runoff race against Fujimori, whose allegations of voter fraud then had to be reviewed by an electoral jury.

For her part, Fujimori said on Twitter that her Popular Force party "will be a firm wall against the latent threat of a new communist constitution."

Thousands of police were deployed in the streets of Lima as Castillo fans gathered to show their support
Thousands of police were deployed in the streets of Lima as Castillo fans gathered to show their support AFP / Gian Masko

"We will make a responsible democratic defense," she added.

Wednesday's swearing-in was attended by Spanish King Felipe VI, five Latin American leaders, former Bolivian president Evo Morales and the United States education secretary, among other guests.

Some 10,000 police officers were deployed in the capital Lima, and Castillo voters came out waving banners in a show of support.

Profile of Pedro Castillo, Peru's new president.
Profile of Pedro Castillo, Peru's new president. AFP / Tatiana MAGARINOS

"This is the first time this country will be governed by a peasant," Castillo told guests, sporting his trademark, traditional white sombrero and a typical black Andean suit.

He also sought to calm fears among the business community, who had sought to portray him as a communist who would turn Peru into a new Venezuela.

"During the election campaign it was said that we are going to expropriate (assets). It is totally false. We want the economy to have order," the new president said, adding, however, that he would be looking for a "new deal with private investors."

Pedro Castillo, 51, became Peru's fifth president in three years
Pedro Castillo, 51, became Peru's fifth president in three years AFP / ERNESTO BENAVIDES

Castillo is Peru's first president in decades with no ties to the country's political or economic elite.

He has promised reform to ensure there are "no more poor people in a rich country," but has softened his initial campaign talk of nationalization.

He is a devout Catholic opposed to gay marriage and abortion.

Peru has been hard-hit by the coronavirus epidemic. With nearly 200,000 deaths among its 32 million population, it has the world's highest reported mortality rate.

An extended pandemic lockdown in 2020 is blamed for the loss of millions of jobs and dumping the country into recession. GDP dropped more than 11 percent.

It is widely hoped Castillo will bring an end to years of political upheaval in Peru.

A series of corruption scandals saw three different presidents in office in a single week last November.

Seven of the country's last 10 leaders have either been convicted or are under investigation for graft.

Now that she has lost, Fujimori faces a corruption trial for allegedly taking illicit campaign funding for two previous presidential bids.

The election campaign has also been deeply polarizing, with often vehement public support on both sides of the political spectrum for the final two contenders.

"Castillo must rapidly position himself as a president of all Peruvians and not as a president of half of Peruvians," political analyst Jessica Smith told AFP.

Shortly after Wednesday's inauguration ceremony, Venezuela's Foreign Minister Jorge Arreaza arrived in Lima, according to the Andina news agency.

This marked a turning point in relations, with Peru among dozens of countries -- including the United States -- to have recognized opposition leader Juan Guaido as Venezuela's legitimate leader over President Nicolas Maduro.

Free Peru is one of few left-wing Peruvian parties to defend Maduro's regime.

Castillo, who has vowed to renounce his presidential salary, said Wednesday he would not govern from the official presidential residence, Pizarro Palace, in a "break with the colonial symbols," and said he would return to his schoolteacher's job at the end of his five-year term.