Poland's Duda slightly ahead in presidential vote - exit poll

Polish President Duda visits a polling station during the second round of a presidential election in Krakow

WARSAW (Reuters) - President Andrzej Duda was marginally ahead in Poland's presidential election, an exit poll showed on Sunday, in a result with profound implications for relations with the rest of the European Union.

Duda, an ally of the ruling nationalists Law and Justice (PiS), got 50.4% of the vote, according to the exit poll.

Warsaw Mayor Rafal Trzaskowski, the favoured candidate of the main opposition party, the centrist Civic Platform (PO), got 49.6%.

The exit poll by Ipsos has a margin of error of two percentage points for each candidate. Preliminary results are expected on Monday.

(Reporting by Warsaw Newsroom; Editing by Frances Kerry)