Conservative Christian preacher Fabricio Alvarado has had a strong showing in the first round of Costa Rica's presidential election, which was dominated by the issue of gay marriage.

With most votes counted, Mr Alvarado had 24.7% of the vote with nearest rival Carlos Alvarado on 21.6%.

As neither won 40%, both candidates will go to a run-off in April.

Same-sex marriage became a key issue after a court ruled that such alliances should be recognised in the country.

The Inter-American Court of Human Rights requires deeply Catholic Costa Rica to abide by its ruling.

But the decision led to a backlash and saw Fabricio Alvarado become the most popular presidential candidate.

Ahead of Sunday's election, Mr Alvarado, who represents the right-wing National Restoration Party (PRN), surged to the top of opinion polls.

In all, 13 candidates ran to replace President Luis Guillermo Solis of the centre-left Citizen's Action Party (PAC).

PAC candidate Carlos Alvarado (no relation to Fabricio Alvarado) took second place ahead of former lawmaker Antonio Alvarez from the centre-right National Liberation Party (PLN). Turnout was 65%.

Final first-round results will be published later on Monday.