Colombia's first ever left-wing president Gustavo Petro, elected on Sunday, is a former guerrilla who spent two years in jail before turning to politics.
He won 50.49 percent of a runoff vote with 99.7 percent of the ballots counted, after a tense and unpredictable campaign against maverick millionaire businessman Rodolfo Hernandez.
But 10.5 million people voted against him in the second round, in a country with a total population of some 50 million, underscoring a potentially bumpy road ahead.
"It should be well understood that a significant portion of the country did not want Petro to become president," Sergio Guzman, president of the Colombia Risk Analysis consultancy told AFP.
Petro, 62, was mayor of Bogota from 2012 to 2015 -- a stint that was not without controversy and gave birth to unflattering accounts of his management style and alleged despotic tendencies.
He has "a very impetuous and authoritarian temperament, and when he insisted on carrying out his proposals ... he did not know how to persuade the different sectors to put them into practice," said Daniel Garcia-Pena, Petro's adviser at the time.
Petro also garnered much criticism as mayor for a chaotic plan to nationalize rubbish collection.
A self-styled "revolutionary" warrior for the marginalized -- black and Indigenous people, the poor and the young -- Petro promises to address hunger and inequality.
This was his third presidential race.
"He believes it's his destiny ... that he's the only person who can save Colombia," said a source close to the president-elect.
- Guerrilla organizer -
The father of six is seen as a good orator, though not necessarily charismatic. He is a map buff, and a keen social media user.
Born into a modest family on Colombia's Caribbean coast, Petro embraced leftist politics as a teenager after the 1973 coup d'etat in Chile that unseated Marxist president Salvador Allende.
He joined the M-19 urban guerrilla group as a 17-year-old, but insisted afterwards that his role in Colombia's decades of civil war was as an organizer, never a fighter.
Petro was captured by the military in 1985 and claimed to have been tortured before spending almost two years in jail on arms charges.
He was freed and the M-19 signed a peace deal with the government in 1990. He has since served as a lower house legislator, senator and mayor.
- 'Smart', 'ambitious' -
Petro's critics have sought to portray him as a radical populist who will bring about a Venezuela-style economic collapse.
He has, however, railed against the "banana republic" rule of Colombia's neighbor and vowed there would be no expropriation on his watch.
"I can't imagine Petro would pursue that for two reasons: his whole adult life has been looking for the big prize as Colombia president and he's smart enough to know Venezuela is a complete disaster," Michael Shifter, of the Inter-American Dialogue think tank, told AFP.
In a country with a tradition of political killings, Petro is no stranger to death threats and travels in a convoy of a dozen armored vehicles accompanied by police on motorcycles, an ambulance and snipers.
He has said he would reopen negotiations with Colombia's last guerrilla group, the ELN, and seek to peacefully dismantle the drug trade.
"This is a very ambitious plan, it's very important, however, because it's the only real exit route to the conflict," Elizabeth Dickinson, Colombia analyst at International Crisis Group in Bogota, told AFP.
Petro has made it his mission to address climate change, somewhat controversially by phasing out crude oil exploration -- a major income-earner for Colombia.
He was also accused of playing a "dangerous" game by regularly evoking potential fraud in the lead up to Sunday's vote, and on the day itself.