Boris Johnson meeting Leo Varadkar in Dublin. A few weeks later, the prime ministers flagrantly betrayed unionists, by the standards of his own rhetoric, about never accepting a border in the Irish Sea. Then a few weeks after that betrayal, the recent decline in the unionist vote was confirmed by the general election results. Photo: Niall Carson/PA Wire

It was in the final weeks of 2019 that Boris Johnson’s Withdrawal Agreement passed the House of Commons, with not a single Tory MP raising objections to the economic barrier that will now separate Northern Ireland from the rest of the United Kingdom.

Within weeks the UK will be out of the European Union, and the widespread outrage of nationalist Ireland at that prospect has been replaced with quiet satisfaction, and in some reaches of republicanism perhaps even joy, at this major new all-island approach to trade.

Only a handful of years ago Northern Ireland’s place was so secure that it seemed perhaps that Irish unity might never happen. I wrote an article about what I called the Rory McIlroy generation of people from a Catholic background who were so content living in the UK that the unification of Ireland was not on their radar.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

It must have been a frustrating time for those whose political aim is a 32-county independent Ireland.

Now there is a possibility of the inverse: young people from a Protestant background who, without giving it much thought wanted to stay in the UK and were instinctively Northern Irish by identity, but who might be open to Irish unity, if it means remaining in the European Union.

Or even if not that, they are clearly not bothered by an economic frontier in the Irish Sea.

The difficulties facing unionism are greatly compounded by the fact that it has found itself at odds on social issues with a much more liberal attitude to matters such as same-sex relations, which has swept much of the world, from countries that were once staunchly Catholic in South America to countries in northern Europe that no so long ago were devoutly Protestant.

In addition to Boris Johnson’s flagrant (by the standards of his own rhetoric about the completely unacceptable nature of an Irish Sea border) betrayal of unionists, the unionist vote has gone into decline, now confirmed by four consecutive elections in Northern Ireland.

Caught in the eye of this almost perfect political storm, the DUP has struggled to find the right image.

Younger members such as Gavin Robinson and Emma Little Pengelly have seemed much more plugged into the liberal atmosphere.

Prominent older members have often seemed hostile to it, which is hardly surprising given the DUP’s origins in fundamentalism. And the party gets praise from once unlikely quarters, such as traditional Catholics, due to its stance on issues such as abortion, making it near impossible for the DUP to liberalise without alienating its Christian base.

Yet it has been clear to me for almost 30 years that a growing section of the Protestant electorate is as unionist as it has ever been, but not conservative on social matters.

It was apparent in the 1980s when in Protestant parts of East Belfast pub-goers began simply to ignore the Sunday opening ban and since the 1990 referendum in DUP-held Castlereagh showed overwhelming support for Sunday opening of leisure facilities, and it is now even more marked, given the radical shift among younger voters on sexual and moral questions.

Now much of the DUP vote is solely to keep out, or help to mitigate the influence of, Sinn Fein.

This was apparent at Elmgrove Primary School in East Belfast on election day, when I again carried out an exit poll there. Most DUP voters had voted for them in the previous election, and were content, saying things like: “Always DUP” or “They’re doing a great job.”

But a noticeable minority, when I asked how they had voted, said things such as: “DUP, and DUP last time, but I don’t like them.”

It reminded me of talking to voters outside a polling station in North Carolina and finding that a large minority of Donald Trump voters seemed to dislike him, but disliked Hillary Clinton more.

DUP problems are compounded by deep UUP antagonism to them – hardly surprising given that the former tried to destroy the latter.

Any attempt to rely on loyalists to get the vote out seems set only to worsen the DUP’s situation. I was expecting Claire Hanna of the SDLP to beat Mrs Little Pengelly in South Belfast by 20,000 votes to 13,000 (her DUP total last time). In fact it was 27,000 votes to 11,000.

A DUP-loyalist vote drive seemed only to alienate some moderate unionists.

Meanwhile, unionism will be depicted as ‘always saying no’ when it (rightly) resists a wave of minor assaults on Britishness or UK sovereignty here.

A hugely charismatic leader might boost unionist fortunes, but such leaders are rare in any party and none is on the horizon.

Ideally a new movement would rise from the ashes, but it would need to eschew unionist symbolism (while defending the primacy of some of them such as the national flag) and that would alienate traditionalists. Such a movement might attract naive unionists who just join the chorus calling for ‘concessions’.

Yet all is far from lost for unionism as the 2020s begin.

Winston Churchill was prepared to give Northern Ireland away during the war. Edward Heath’s cabinet considered the same in 1972.

The 1985 Anglo Irish Agreement, while disastrous in principle for unionists, was probably disappointing in practice for Irish unity advocates.

The 1998 Belfast Agreement, for all its profound flaws, was followed by the aforementioned stable period.

It is possible that the Boris deal will please people who want ‘the best of both UK and EU’ and secure NI in the UK for many decades.

One thing unionism must ditch is the mercenary image to which the Conservative commentator Henry Hill referred on this page yesterday (see link below).

Mr Hill was speaking as a friend, and when even friends say that you have to listen.

• Ben Lowry (@BenLowry2) is News Letter deputy editor