BOGOTA - The conservative protege of a powerful former president and a leftist former guerrilla who has galvanized voters with an anti-establishment message are headed for what promises to be a polarizing presidential runoff after gaining the most votes in Sunday's election.

With almost all quick-count results in, former senator Ivan Duque was leading with 39 per cent of the ballots cast, short of the 50 per cent threshold needed to avoid a June runoff. One-time rebel and ex-Bogota mayor Gustavo Petro trailed in second place with 25 per cent, edging out former Medellin Mayor Sergio Fajardo, who garnered nearly 24 per cent.

Duque and Petro represent opposite ends of Colombia's political spectrum and have presented dramatically different visions for the future of the Andean nation as it moves forward with a historic peace process with leftist rebels.

Duque is the handpicked candidate of Alvaro Uribe, the ex-president and chief critic of the nation's 2016 peace deal with the Revolutionary Armed Forces of Colombia. He is promising to amend important aspects of the accord like ensuring that drug trafficking is not an amnestied crime and blocking guerrilla leaders from political office.

Petro supports the accord and has galvanized youth voters angered by deeply entrenched corruption and income inequality. He is vowing to end Colombia's dependence on oil exports and raise taxes on vast swaths of unproductive land in hopes of boosting agricultural production. Critics have warned his rise could push Colombia dangerously toward the left and rattle markets.

“The result was a sharp blow to traditional politics,” said Michael Shifter, president of the Inter-American Dialogue. “With a Duque/Petro runoff, Colombians will face a starker choice than in many years.”

The election has sparked fears on both the left and right, with Duque's critics cautioning that his presidency would be tantamount to a constitutionally barred third term for Uribe. Though hugely popular among Colombians for improving security and weakening illegal armed groups, Uribe also presided over grave human rights violations by the military.

Meanwhile, Petro and his populist “Humane Colombia” platform have drawn comparisons from critics to the late Venezuelan socialist leader Hugo Chavez, who Petro once admired. He brought Chavez to Colombia in 1994 shortly after the Venezuelan paratrooper was released from jail, where he was sent for staging a military coup.

Petro describes himself as a “strong adversary” of the neighbouring country's current president, Nicolas Maduro, but his early ties to Chavez have dogged him throughout the campaign. His campaign likened the comparisons to fear-mongering tactics by a traditional political class no longer able to court votes based on their hardline stance against leftist rebels.

“This is an electoral debate between corrupt political networks and free citizens,” Petro, 58, said after casting his ballot at a school in a working class neighbourhood of Bogota, where he was swarmed by supporters chanting his name and clamouring for selfies.

Johana Contreras, 29, a flight attendant, was among those casting a vote for Petro.

“For years, the only thing the right has caused us is problems,” she said. “We hope Petro can show us the way.”

More than 19 million voters cast ballots in the election, the highest turnout in two decades.

The results were especially harsh for Fajardo, who fell less than 2 points behind Petro and failed to advance to the next round. During weeks of negotiations he tried unsuccessfully to form an alliance with like-minded centrist Humberto de la Calle, whose 2 per cent vote haul would've been enough to push Fajardo past Petro.

Fajardo conceded defeat but showed no sign of who he'll support in a runoff where his 4.5 million supporters are likely to be decisive.

Petro and Duque differ on almost every critical issue facing Colombia: Duque favours forcibly eradicating coca crops that have skyrocketed to record levels, whereas Petro favours substitution. Historically tight relations between the U.S. and Colombia would likely remain unchanged under a Duque presidency, whereas Petro has called U.S. assistance to Colombia “help that has served for nothing.”

In regards to the peace deal, Duque has said he'll introduce a constitutional reform mandating that drug trafficking cannot be an amnestied crime. Under the accord, guerrillas involved in drug trafficking and violent crimes during the conflict who fully confess can avoid jail time. Many Colombians consider those terms far too generous.

The FARC long funded itself by levelling a “war tax” on cocaine moving through territory it dominated, and 50 members of its leadership structure were indicted in 2006 in the U.S. on charges of running the world's largest drug cartel.

In April, Colombian authorities arrested a former top rebel peace negotiator on a U.S. drug warrant on charges that he conspired with three others to smuggle several tons of cocaine into the U.S. with a wholesale value of $15 million.

Analysts said that mostly urban voters turned off by Colombia's polarizing politics will play kingmaker in the second round.

Political analyst Ivan Valencia, himself a former rebel, said Duque will face a steeper challenge winning over supporters of Fajardo and other centrist candidates because he's more hostile to the peace process, while Petro from the campaign's outset has tried to portray himself - so far with mixes success - as a moderate.

“Whichever candidate is able to move more to the centre is the one who will win the election,” said Valencia.

De la Calle, the government's chief negotiator with the FARC, without specifically endorsing Petro, made an impassioned plea not to backtrack on implementation of the peace accord when a future free of armed conflict is within reach.

“The war brought us together during eight years,” he said. “And now peace is dividing us.”