Thirty years after it jettisoned Communism in the face of liberal winds blowing across Eastern Europe, not to forget Lech Walesa’s Solidarity movement in the early 1980s, the re-election of Andrzej Duda as Poland’s President in a cliffhanger election is profoundly significant for the future of the nation. Psephologically, his victory is scarcely convincing; he defeated his liberal opponent, Rafal Trzaskowski, by the narrowest of margins.

There has been no swing per se. Markedly, the latter still boasts the support of 48 per cent of the voters, which would ensure a fairly robust presence of the Opposition.

Polish liberals must now find a way to reconnect with non-urban voters. Yet the portents are somewhat discouraging. Poland under President Duda is likely to be a less open and less liberal country. Despite the wafer-thin victory, the ruling Law and Justice party (PiS) now has a clear run until elections in 2023 to further entrench its perceptions at the heart of institutions such as schools, the judiciary and the media.

The outlook is uncertain for the LGBT community in Poland. Last week, on the campaign trail, Mr Duda promised to introduce a new constitutional clause banning same-sex adoption and he will continue to block same-sex marriage.

Life for Poland’s beleaguered independent media will become still more difficult. The confrontation between the government and EU over the alleged undermining of judges’ independence will continue. The road ahead for Poland will, therefore, be stormy on several counts and given his slim margin of victory, the going will be far from smooth for the re-elected President. The country seems headed for a bout of societal ferment.

There is sympathy in Warsaw and further afield with the 48.8 per cent of voters who backed Mr Trzaskowski, in the hope of making Poland a more open and tolerant country than Mr Duda and PiS will allow it to be. In the event it was desperately close ~ a matter of about half a million votes. A woefully biased state media played its part. But this bitter defeat also carries a stark lesson for Opposition parties. When Duda’s second term appeared to be in serious jeopardy, his supporters were able to mobilise a majority, predominantly made up of older voters and those living in rural communities and small towns.

A crucial proportion of those who had stayed home for the first vote two weeks ago, turned out for the second round run-off. It was a demonstration that, in the parts of the country sometimes referred to as “Poland B”, which have seen less of the benefits of globalisation, PiS’s redistributive programmes are popular and inspire fierce loyalty. While the ruling PiS is conservative and bigoted, Poland is at the crossroads.