Some 30% of the electorate remained undecided in the final days before the vote and there were fears that the COVID-19 pandemic could suppress turnout.
The winning candidate needs to capture at least 40% of the vote to avoid a runoff. But no single candidate came close to that threshold in recent polls, so a runoff vote on April 3 between the top two candidates is expected.
Costa Rica is often referred to as the region's "happiest" country, but it is currently grappling with a growing economic crisis. Costa Ricans are frustrated by recent public corruption scandals, another surge of COVID-19 infections and poor economic conditions.
Unemployment has been steadily rising for more than a decade and sat at 14.4 % in 2021. Poverty reached 23% in 2021, with debt now at a staggering 70% of GDP.
Ruling party set for defeat
Current president Carlos Alvarado Quesada's party, the Citizen's Action Party (PAC), is expected to suffer a bruising defeat, as voters have held the current government responsible for the country's economic woes.
PAC candidate and Alvarado Quesada's successor, former economy minister Welmer Ramos, is currently polling at just 0.3%.
Businessman and former president from 1994 to 1998, Jose Maria Figueres, has thrown his hat into the ring representing the National Liberation Party, which was founded by his father Jose Figueres Ferrer, who himself served as the country's president in the 1940s, 1950s and 1970s.
Lineth Saborio, who served as the country's vice-president from 2002 to 2006, is running for the banner of the Christian Social Unity party.
According to one poll published this month, Figueres leads the race with just over 17%, followed by Saborio with just under 13%.
Also in the running is evangelical Christian singer Fabricio Alvarado Munoz of the right-wing New Republic Party (PNR) in third spot with just over 10%. Alvarado Munoz lost to Alvarado Quesada in the last election.
jcg/wd (Reuters, AFP, AP)