BOGOTA, Colombia -- 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 percent of the ballots cast, short of the 50 percent threshold needed to avoid a June runoff.

One-time rebel and ex-Bogota mayor Gustavo Petro trailed in second place with 25 percent, edging out former Medellin Mayor Sergio Fajardo, who garnered nearly 24 percent.

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.

Get Breaking News Delivered to Your Inbox

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.

Colombian presidential candidate Gustavo Petro speaks to supporters and the news media after polls closed in the first round of the presidential election in Bogota, Colombia May 27, 2018. Henry Romero / REUTERS

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.

"I'm worried ... Populism is strengthening," Nicolas Goyeneche, 28-year-old student, told Reuters news agency."But in the second round, we'll beat populism."

Petro describes himself as a "strong adversary" of the neighboring 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.

In a speech before hundreds of supporters Sunday night, Petro said fears that he would turn Colombia into an authoritarian state where wealth is redistributed are unfounded. He said his proposals instead amount to a "democratization" of opportunities so that more Colombians can benefit from education and join the middle class.

"The nearly 5 million votes we received today are the votes of the youth, of excluded sectors far and wide across Colombia who have decided to burst in and say, 'We are present,'" he said.

Supporters waved flags emblazoned with the Soviet Union's hammer and sickle and the logo of the disbanded M-19 rebel group that Petro belonged to in his youth.

Edilia Pinzon, 55, was among those cheering on Petro.

"We are making history," said Pinzon, a street merchant. "The others who have reached power haven't fulfilled their promises, especially to those of us with few means."

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 percent 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 favors forcibly eradicating coca crops that have skyrocketed to record levels, whereas Petro favors 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 leveling 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.

In a victory speech to supporters little changed from his regular campaign stump, Duque stressed law and order issues that are red meat to his conservative base. He said he didn't want to "tear up" Colombia's peace agreement but rather make modifications that would ensure victims of the conflict achieve "peace with justice."

"I want to be the president who unites our country and not govern with a rearview mirror," he said.

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 center 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."