Poland’s conservative president, Andrzej Duda, is on course for a second term following the country’s weekend election.
The state electoral commission said on Monday that Mr Duda has won 51.21% of the ballot with almost all votes counted.
The nearly complete results, based on a count of 99.97% of votes counted, shows liberal Warsaw Mayor Rafal Trzaskowski defeated with 48.79% of the vote.
The final results could vary slightly.
If the result is borne out, it would be one of closest elections in Poland’s history, reflecting the deep divisions in the European Union nation.
Sunday’s vote was originally planned for May but was delayed amid bitter political wrangling.
It follows a bitter campaign dominated by issues of culture in which the government, state media and the influential Catholic church all mobilised in support of Mr Duda, a social conservative.
Mr Duda, who is backed by the ruling right-wing Law and Justice party, campaigned on traditional values and social spending in the mostly Catholic nation as he sought a second five-year term.
As the race became tighter in recent weeks, he turned further to the right in search of votes.
He seized on gay rights as a key theme, denouncing the LGBT rights movement as an “ideology” worse than communism.
Mr Duda’s campaign also cast Mr Trzaskowski as someone who would sell out Polish families to Jewish interests, tapping into old anti-Semitic tropes in a country that was home to Europe’s largest Jewish community before it was decimated by Germany in the Holocaust.