* President Duda has unassailable lead - election officials
* Duda is an ally of ruling nationalist party PiS
* PiS is at odds with Brussels over reforms of judiciary (Adds quotes)
By Joanna Plucinska and Marcin Goclowski
WARSAW, July 13 (Reuters) - Polish President Andrzej Duda has won five more years in power on a socially conservative, religious platform in a closely fought election that is likely to deepen Warsaw's isolation in the European Union.
Nearly final results from Sunday's presidential election runoff showed Duda, 48, on over 51%, giving him an unassailable lead over liberal Warsaw mayor Rafal Trzaskowski, who won almost 49% of the votes, the National Election Commission said.
A devout Catholic, Duda is allied with the ruling nationalist Law and Justice (PiS) party, and his victory reinforces the government's mandate to pursue reforms of the judiciary and media which the European Commission says subvert democratic standards. Duda has largely backed the PiS policies. His victory makes renewed confrontation with the European Commission likely as the EU executive tries to deal with the economic fallout of the COVID-19 pandemic and rising nationalism across the 27-member bloc.
"To a large extent, the policy of Brussels, or rather Berlin, had focused on supporting the opposition," Arkadiusz Mularczyk, a PiS lawmaker, told Reuters. "Polish society is not accepting this."
Backed by PiS, Duda ran an acrimonious campaign in an election that was held despite the pandemic and was laced with homophobic language, attacks on private media and accusations that Trzaskowski serve foreign interests instead of Poland's.
Trzaskowski, who had said he would repair Poland's relations with Europe and use the presidential veto power to hold back any legislation that would subvert the rule of law, dismissed the accusations.
Before PiS and Duda came to power in 2015, Poland had one of the most pro-European administrations in the bloc, with divisions focusing on climate change and migration, in addition to democratic norms.
Rifts are likely to be evident this week when EU leaders discuss the bloc's long-term budget, with Brussels facing growing calls for funding to be made conditional on respect for the rule of law.
"EU institutions and the broader international community must now be vigilant to ensure ... minority rights in Poland are upheld in the coming years," said Dacian Ciolos, former Prime Minister of Romania and President of the Renew Europe Group in the European Parliament.
Brussels did not immediately comment on the election outcome. One EU country swiftly welcomed Duda's re-election -- Hungary, which is also among anti-liberal voices in central Europe.
"The international liberal mainstream once again tried everything but the central European right wing is up 3:0," Hungarian Foreign Minister Peter Szijjarto said on Facebook, referring to recent conservative triumphs in Croatia, which is an EU member state, and Serbia, which is not in the EU.
Trzaskowski had said that, if elected, he would seek a more tolerant Poland and abolish state news channel TVP Info, which critics say gave overt support to Duda in its programming.
But, to many religious conservatives in the predominantly Catholic nation, Trzaskowski came to represent the threats facing traditional values when he pledged to introduce education about LGBT rights in Warsaw schools.
"I chose someone who represents the same values as I do. Christian values, family values, the protection of life from conception until natural death," said Jarek Sieczka, a 25-year-old municipal official who lives near Zyrardow, outside Warsaw.
Duda also painted himself as a guardian of generous PiS welfare programmes that have transformed life for many poorer Poles under PiS.
PiS does not face a parliamentary election until 2023 but some observers say Trzaskowski's relatively strong showing could energise the opposition.
Justice Minister Zbigniew Ziobro suggested late on Sunday that PiS could push on quickly with its conservative agenda, and with its ambition to spur change in private media ownership towards outlets more favourable to its ambitions. (Writing by Justyna Pawlak; editing by Timothy Heritage)
Our Standards: The Thomson Reuters Trust Principles.