Costa Rica has completed a manual recount of the votes cast in the election more than two weeks ago - but there is still no official winner.
The manual recount widened Oscar Arias' lead
The recount was ordered after the first count put Nobel Peace Prize laureate Oscar Arias, less than 0.5% ahead of his left-wing rival, Otton Solis.
New results show Mr Arias with a 1.1% lead. But Mr Solis has filed legal challenges which need to be settled.
Electoral officials have said hundreds of complaints are being investigated.
It is not clear how long the process will take and when the official winner will be declared.
Meanwhile, former President Arias told a news conference: "I thank the Costa Rican people for their confidence."
He added that he would lead the country again, 20 years after his first term as president.
The recount is over, but challenges remain
Mr Arias, 65, had enjoyed a big lead over his rival in opinion polls.
But far from the easy victory that had been predicted for him, the election on 5 February became Costa Rica's hardest-fought vote in the last four decades, with the two leading candidates virtually neck-and-neck.
According to the original electronic count, Mr Arias, from the National Liberation Party, had 40.5%, compared with 40.2% for Mr Solis from the Citizens' Action Party - a difference of fewer than 3,300 votes.
But after the manual recount of nearly 1.4 million ballots, the Nobel laureate widened his lead collecting 40.9% of the votes, while his opponent received 39.8%.
The front-runners were expected to go through to a second round if the winner did not get at least 40%.
The election comes amid wide disillusionment with politics after a string of corruption scandals in the country.
Mr Solis wants to renegotiate a free trade deal with the US
Three former presidents, Jose Maria Figueres, Miguel Angel Rodriguez and Rafael Angel Calderon, have been accused of taking illicit payments from foreign companies.
Mr Arias - who was in office between 1986 and 1990 - is not among them, and many Costa Ricans see him as a politician untainted by the recent scandals. But his critics describe him as arrogant.
He won the Nobel Peace Prize in 1987 for spearheading talks that led to the end of civil wars in Nicaragua and El Salvador.
He says he wants Costa Rica to join the Central American Free Trade Agreement (Cafta) with the US.
Costa Rica is the only country in the region which has not ratified the deal, which is set to come into effect later this year.
Mr Solis wants some of the deal to be renegotiated, arguing that in its current form it would exacerbate poverty and hurt small-scale farmers.