Poland's incumbent President Andrzej Duda holds a slim lead after Sunday's presidential election, according to an exit poll.
The poll on Sunday showed Mr Duda, an ally of the conservative government, with 50.4% of the vote.
He was pitted against the socially liberal Warsaw mayor Rafal Trzaskowski.
The vote has been widely seen as a battle for the country's future as well as its strained relations with the European Union.
Mr Trzaskowski received 49.6% of the vote, according to the exit poll, which pollster Ipsos said had a margin of error of two percentage points. Official results are expected on Monday.
"I want to thank everyone that voted for me," Mr Duda told supporters shortly after the exit poll was announced.
He said the turnout was nearly 70%, which, if confirmed by election officials, would be a record high for a presidential election in the country.
A win for Mr Duda is expected to herald controversial changes to the judiciary and continued opposition to abortion and gay rights.
Media playback is unsupported on your device
He came under fire during the election, including for a speech in which he said LGBT rights were an "ideology" more destructive than communism.
Media playback is unsupported on your device
Mr Trzaskowski, meanwhile, has backed a more progressive agenda and an active role in the European Union. The liberal politician rose fast in the polls after joining the race in May. Previously a member of Donald Tusk's liberal Civic Platform government, he won the capital's race for mayor in 2018 promising "Warsaw for All".
He said Polish voters would never have another chance to change Poland's direction.
"All we need is to count the votes. The night will be tense but I am certain that when the votes are counted, we will win," Mr Trzaskowski told supporters on Sunday.
The closest election since communism
If the exit poll is confirmed this is easily the closest presidential election in Poland since the fall of communism in 1989.
In the poll released immediately after voting ended, President Duda won by less than 1%, which is well within the margin of error. If the official count is that tight, either losing candidate could decide to challenge the result.
Both President Duda and Mr Trzaskowski spoke about victory in remarks immediately after the voting ended. Neither was prepared to concede.
Turnout was also at a record high according to the exit poll, with both candidates presenting voters a distinct vision for the future. For President Duda that means social conservatism and generous financial benefits for families.
Mr Trzaskowski is more progressive and he has pledged to use the presidential power of veto to block the government's changes to the judiciary, which have been criticised by the EU for undermining the rule of law.
Mr Duda topped the first round of voting last month with a convincing lead but fell short of the 50% needed to win outright.
The election had been due to take place in May, when Mr Duda was higher in the polls and stood a better chance of winning in the first round.
Although the coronavirus pandemic had not yet peaked, the government was desperate for the May vote to go ahead. It eventually backed down when a junior coalition partner joined the opposition in saying the governing nationalist Law and Justice (PiS) party were putting politics before public health.
Image copyright Getty Images Image caption Voters wore masks due to the coronavirus pandemic