WARSAW, Poland >> An exit poll in Poland’s presidential runoff on Sunday showed the two candidates are very close and that the race was still too close to call. The results could set the course for the nation’s political future and its relations with the European Union.

An Ipsos exit poll released when the voting ended showed that liberal Warsaw mayor Rafal Trzaskowski won 50.3% of the vote and conservative historian Karol Nawrocki won 49.7%. The poll has a margin of error of plus or minus 2 percentage points and the final vote is likely to change somewhat.

Both candidates claimed to have won.

“We won,” Trzaskowski told his supporters at an election night event in Warsaw to chants of “Rafal, Rafal.” He vowed that he would be a president for all Poles, including those who did not vote for him.

It looked as if it could be a long evening in Warsaw as the nation waits for the votes to be counted, and Nawrocki said he believed it would turn in his favor.

“We must win tonight,” he said.

The state electoral commission was expected to release the final vote count on Monday, though the result could be clear sooner.

The decisive presidential runoff pitted Trzaskowski, a liberal pro-EU figure, against Nawrocki, a conservative historian backed by the right-wing Law and Justice party.

The outcome will determine whether Poland takes a more nationalist path or pivots more decisively toward liberal democratic norms. With conservative President Andrzej Duda completing his second and final term, the new president will have significant influence over whether Prime Minister Donald Tusk’s centrist government can fulfill its agenda, given the presidential power to veto laws.

The runoff follows a tightly contested first round of voting on May 18, in which Trzaskowski won just over 31% and Nawrocki nearly 30%, eliminating 11 other candidates.

Katarzyna Malek, a 29-year-old voter in Warsaw, cast her ballot in the first round for a left-wing candidate but went for Trzaskowski on Sunday, viewing him as more competent and more likely to pursue stronger ties with foreign partners and lower social tensions.

“I hope there will be less division, that maybe there will be more dialogue,” she said.

The campaign has highlighted stark ideological divides. Trzaskowski, 53, has promised to restore judicial independence, ease abortion restrictions and promote constructive ties with European partners.