The conservative protege of a powerful former president and a leftist former guerrilla are headed for 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.

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.