Rural school teacher Pedro Castillo will on Wednesday become Peru's first president with no ties to the elites that have governed the Andean country for decades.

The 51-year-old far-left trade unionist was largely unknown until he led a national strike four years ago that forced the then government to agree to pay rise demands.

He was born to peasants in the tiny village of Puna in the historic Cajamarca region where he worked as a teacher for 24 years.

He grew up helping his parents with farm work, and as a child, had to walk several kilometers to school.

Today, he is rarely without the trademark white, wide-brimmed hat of his beloved Cajamarca, where the last Inca emperor Atahualpa was assassinated on the main square in 1533 by Spanish conquistadores.

Castillo likes to don a poncho and shoes made of recycled tires and traveled on horseback for much of his presidential campaign as he vocalized the frustration of struggling Peruvians and cast himself as a man of the people.

"No more poor people in a rich country," he said as he campaigned for the Peru Libre (Free Peru) party.

He has said he would renounce his presidential salary and continue living on his teacher earnings, and described himself as "a man of work, a man of faith, a man of hope."

Castillo, according to analyst Hugo Otero, is "the first poor president of Peru."

In April, Castillo surprised many by taking the lead in the race to become Peru's fifth president in three years, edging out 17 other candidates.

He then faced off against rightwing candidate Keiko Fujimori in the runoff, promising radical change to improve the lot of Peruvians contending with a recession worsened by the pandemic, rising unemployment, and poverty.

One thing unlikely to change under a Castillo presidency is the Peruvian state's socially conservative character: he is Catholic and vehemently opposed to gay marriage, elective abortion, and euthanasia.

He frequently quotes from the Bible to drive home his points, and at his two-story brick home in the hamlet of Chugur in Cajamarca hangs a picture of Jesus surrounded by sheep and a caption, in English, "Jehovah is my shepherd."

Pedro Castillo was born in Puna, a town in Cajamarca, where he worked as a rural school teacher
Pedro Castillo was born in Puna, a town in Cajamarca, where he worked as a rural school teacher X07403 / SEBASTIAN CASTANEDA

Castillo has targeted creating a million jobs in a year and initially vowed Peru's mining and hydrocarbon riches "must be nationalized," though he has softened his message since then.

Peru is a large producer of copper, gold, silver, lead, and zinc, and mining brings in 10 percent of national GDP and a fifth of company taxes.

He has promised public investment to reactivate the economy through infrastructure projects, public procurement from small businesses, and to "curb imports that affect the national industry and peasantry."

Among his more controversial campaign promises, Castillo has vowed to expel illegal foreigners who commit crimes in Peru, giving them "72 hours... to leave the country."

The comment was perceived as a warning to undocumented Venezuelan migrants who have arrived in their hundreds of thousands since 2017.

Free Peru is one of few left-wing Peruvian parties to defend the regime of Venezuelan President Nicolas Maduro, whose 2018 re-election is not recognized by dozens of countries.

To combat crime, Castillo has proposed withdrawing Peru from the American Convention on Human Rights, or the San Jose pact, to allow it to reintroduce the death penalty.

He has also mooted replacing Peru's free-market-friendly constitution -- a relic of his rival's father, ex-president Alberto Fujimori, serving jail time for corruption and crimes against humanity.

Castillo burst onto the national scene four years ago when he led thousands of teachers on a near 80-day strike to demand a pay rise.

It left 3.5 million public school pupils without classes to attend, and compelled then-president Pedro Pablo Kuczynski, who initially refused to negotiate, to relent.

In a bid to delegitimize the protest, then-interior minister Carlos Basombrio claimed its leaders were linked to Movadef, the political wing of the defeated Shining Path Maoist guerrilla group dubbed a "terrorist" organization by Lima.

Castillo, who had participated in armed "peasant patrols" or ronderos that resisted Shining Path incursions at the height of Peru's internal conflict from 1980 to 2000, vehemently rejected these allegations.

Today, his home is guarded by ronderos brandishing canes and leather whips.

Next to his house, Castillo has a one-hectare farm where he grows corn and sweet potatoes and raises chickens and cows.

In a meeting with interim President Francisco Sagasti at the government palace last week, he jokingly asked where he would fit all his farm animals.