Laura Chinchilla celebrates the win
Costa Rica is set to have its first female president, after election results gave governing party candidate Laura Chinchilla an unassailable lead.
With most votes counted from Sunday's poll, Ms Chinchilla had 47% of the vote, 22 points ahead of the main opposition contender, Otton Solis.
Ms Chinchilla, a former vice-president, has pledged to continue the free-market policies of outgoing head, Oscar Arias.
She has also promised to tackle violent crime, a growing issue in Costa Rica.
"The biggest challenge we face is criminality, violence and drug-trafficking," Ms Chinchilla, 50, told her supporters.
Costa Rica, along with other Central American nations, is increasingly being used as a transit route for drugs smuggled from South America to the US market.
She also responded to criticism that she is too close to Mr Arias, a Nobel Peace Prize winner, and that he will continue to control government policies.
"I have to justify the confidence placed in me by having an independent government focused on the wellbeing of my country," Ms Chinchilla said.
Mr Solis, who was narrowly defeated by Mr Arias in Costa Rica's previous presidential vote, was quick to declare Ms Chinchilla the winner.
Mr Solis won some 25% of the vote, while the third-placed candidate, Otto Guevara, won 21%.
Costa Rica is one of Latin America's most stable countries.
The country abolished its army in 1949 and has become known in recent years for tourism and progressive environmental policies.