Ecuadoreans will choose between returning to socialism or preserving the conservative status quo in a presidential run-off set for October after Sunday's first round produced a left-right clash rather than an outright winner.
Luisa González, a lawyer close to divisive former socialist president Rafael Correa, emerged as the frontrunner with 33 percent of the first-round votes.
She will go head-to-head with surprise second-place candidate Daniel Noboa, the youthful son of one of Ecuador's richest men, who netted 24 percent of the votes.
After a tense day under heavy security, President of the National Electoral Council Diana Atamaint said no candidate had hit the threshold to claim victory.
"We are heading to a second-round election on October 15," she told journalists.
Noboa, 35, said the "youth" had chosen him to beat Correa's party, while González hailed her "triumph" in the first round.
"We are making history," she declared.
The left-right duel to replace unpopular conservative leader Guillermo Lasso comes after a chaotic campaign marred by violence, including the assassination of a leading candidate days ahead of the polls.
The small South American country has in recent years become a playground for foreign drug mafias seeking to export cocaine from its shores, stirring up a brutal war between local gangs.
It hit a record of 26 homicides per 100,000 inhabitants last year, almost double 2021's figure and higher than the rate in Colombia, Mexico and Brazil.
'Security, above all'
The murder of journalist-turned-candidate Fernando Villavicencio just 11 days before the vote underscored the challenges facing Ecuador.
Soldiers and police searched voters at polling stations, while some of the eight presidential candidates wore helmets and bulletproof vests to cast their ballots.
"The most serious problem is insecurity," said voter Eva Hurtado, 40, as she left a polling station north of the capital Quito on Sunday morning. "So many crimes, assassinations, disappearances. We are afraid."
Public worker Luis Veloso, 52, said: "Security, above all the security of our families, of our people, must be improved."
Adding to the instability, Ecuador has been without a congress for three months after Lasso dissolved it and called a snap election to avoid an impeachment trial just two years after coming to power.
González, who has positioned herself as a defender of ex-president Correa's socialist legacy, has said he would be a close adviser if she is elected.
Correa was sentenced to eight years in jail after an investigation by Villavicencio into corruption and fled to Belgium where he has been living in exile for six years.
Villavicencio, who was second in the polls until his murder, was replaced by close friend and fellow journalist Christian Zurita, who came third with 16 percent of votes.
Zurita said hours before the vote he was receiving death threats on social media.
However, it was Noboa, who appeared in the only televised debate in a bulletproof jacket, who pulled off the biggest surprise of the day.
His father, Alvaro Noboa, ran unsuccessfully for the presidency five times.
Ecuador was once seen as a haven of peace wedged between cocaine-producing nations Colombia and Peru.
The small country straddles the Andes and the Amazon and was best known as the world's top exporter of bananas and home to the biodiverse Galapagos Islands, which inspired British scientist Charles Darwin's theory of evolution.
However, in the past five years, its large ports, lax security and corruption have lured foreign cartels that have come under increased pressure from the war on drugs in Mexico and Colombia.
A struggle for power between local gangs has mostly played out in prisons, where 430 have been killed since 2021, leaving a trail of dismembered and burned bodies.
Around 27 percent of the population lives in poverty and a quarter of Ecuadoreans have informal jobs or are unemployed.
In one of the world's most biodiverse countries, a historic referendum also took place on whether to keep drilling for oil in an Amazon reserve that is home to three of the world's last uncontacted indigenous populations.
With 70 percent of votes counted, the vote to halt drilling was leading with 59 percent of support.
"What planet are we going to leave to our future generations?" asked civil servant Luis Veloso, 52, who opposes the drilling.
by Lina Vanegas, AFP