Polish liberals performed worse than expected in a presidential election on Sunday, exit polls showed, as Rafal Trzaskowski from ruling centrists Civic Coalition (KO) scraped to victory, setting up a close fight for Warsaw's pro-European path.

Trzaskowski placed first with 31.1% of the vote, ahead of Karol Nawrocki, the candidate backed by the nationalist Law and Justice (PiS) party, who had 29.1%, according to an Ipsos late poll. The gap was much narrower than the 4-7 percentage points seen in opinion polls before the vote.

If confirmed, the result would mean that Trzaskowski and Nawrocki will go head-to-head in a runoff vote on June 1 to determine whether Poland sticks firmly on the pro-European track set by Polish Prime Minister Donald Tusk or moves closer to nationalist admirers of U.S. President Donald Trump.