Polish President Andrzej Duda squeezed past a europhile rival to win re-election, official results showed Monday, but the narrow victory put allies in the populist right-wing Law and Justice (PiS) party on the back foot. Seeking close ties with US President Donald Trump, Duda has vowed to tighten already restrictive laws against abortion, and campaigned against LGBT rights. Trump on Monday congratulated Duda on his “historic re-election”.“Looking forward to continuing our important work together,” he wrote on Twitter. The incumbent won a new five-year term with 51.03 percent of Sunday’s vote against 48.97 percent for Warsaw’s liberal mayor Rafal Trzaskowski, according to final results from the country’s electoral commission.Trzaskowski had vowed to mend ties with the European Union. European Commission president Ursula von der Leyen congratulated Duda on his win, tweeting that she looked “forward to working with him on the many challenges Europe and Poland have to face together”.Experts said the result means the governing PiS party, which has been criticised at home and abroad for reforms of the judiciary seen as eroding democratic freedoms, will face a more confident opposition. “President Duda has won the election, but the real success is for Rafal Trzaskowski and the opposition which has gained ground,” said Kazimierz Kik, a political expert from Kielce University.Anna Materska-Sosnowska, a Warsaw University political scientist, warned there was a “realistic” risk that Poland could begin to resemble Hungary, which has been accused of drifting towards authoritarianism under nationalist Prime Minister Viktor Orban.‘Poland divided in two’After congratulating Duda on Monday, Trzaskowski called on the president to “free himself from his political party”, adding: “I hope the president will display more independence in his second term.”Trzaskowski vowed to work hard “to sew Poland back together”, a sentiment echoed by Duda, who asked supporters to “help me glue our Poland together”.The government must now deal with the fallout of the coronavirus pandemic, which is pushing Poland into a recession — the country’s first since communism fell three decades ago.“Poland is split down the middle,” remarked Witold Orlowski, a professor at Warsaw University of Technology Business School who forecast “a very difficult period” ahead.“On the one hand, even this slim victory is a PiS success and will allow it to continue to govern, at least technically,” Orlowski said.“On the other hand, the social and economic situation will deteriorate and a large part of the electorate will blame the PiS.”Internationally, experts said Duda’s close ties with Trump could also spell trouble ahead if the US president fails to win re-election in November.Duda’s support was particularly strong among older voters in rural areas and small towns and in the east of the country, while Trzaskowski did well with a younger electorate in larger cities and western regions on the border with Germany.“The result of these elections is a Poland divided in two with a not-so-rosy future, as it will be difficult to ease the division and to restore the relationship between the two sides,” Kik told AFP.White-red vs rainbowThe election was to take place in May but was delayed because of the virus. our days before the first round, Duda became the first foreign leader to visit the White House since the pandemic struck, and was praised by Trump for doing an “excellent job”.Justice Minister Zbigniew Ziobro characterised the second-round vote as “a clash of two visions of Poland, the white-red and rainbow-coloured”, referring to the colours of Poland’s national flag and the symbol widely used by the LGBT community. Duda has railed against “LGBT ideology”, likening it to a new form of communist brainwashing, and has vowed to change the constitution to rule out adoptions by same-sex couples.