There’s a scene in Trainspotting 2 in which Sick Boy and Renton go on a pickpocketting rampage in a Scottish loyalist club only to find their exit barred by a tattooed heavy who accuses them of being outsiders. They are forced to take the stage to prove their credentials in front of a hostile crowd. Improvising desperately, Renton creates a song about the Battle of the Boyne with the chorus, “No more Catholics!” It is a howling, stomping success. A revival. The crowd is filled with pure old fashioned sectarian joy, and the boys make their escape.

The DUP leader, Arlene Foster, attempted just such a stunt with the launch of her party’s manifesto for this coming Thursday's assembly elections in Northern Ireland. DUP voters have never had any great love for powersharing but had learned grudgingly to live with it. It is just nine months since the last election, and there is resentment among the public about being dragged out again. Many are angry and shocked over the wasting of billions of pounds worth of public money on a botched government subsidy scheme. At the launch, Foster made no reference to these matters. Instead she made an audaciously crude bid to rally her people around that old common denominator, hatred and fear of the bearded bogey man, Sinn Fein leader Gerry Adams. Vote DUP, she was saying, or Adams the gunman will triumph and darkness will fall upon Ulster. One journalist took the trouble to count the references to Sinn Fein in Foster’s speech. There were 32, one for every county in a united Ireland.

This banging of the Orange drum to get unionists into a belligerent huddle against the common enemy always worked for the DUP’s founder, Ian Paisley. It remains to be seen if it will save Foster from electoral losses. It is unlikely that many of her people will defect to the now eclipsed Ulster Unionist Party, particularly since its leader Mike Nesbitt has just made an ill judged foray into the uncharted waters of cross community politics by suggesting that unionists could give their second preference votes to the nationalist SDLP. He had apparently neglected to discuss this tactic with party colleagues, or with the SDLP, which has troubles enough of its own and has reacted coolly.

There is a greater risk that the disillusioned will simply decline to vote at all. Only 54% of the NI electorate turned out for the 2016 assembly elections. If the DUP wins less than 30 seats it loses the right to use a blocking mechanism called a “petition of concern”. This is one of the few bits of the Good Friday Agreement the party likes. It was intended to prevent discrimination - the DUP has used it on many occasions, notably to shoot down legislation for gay marriage and for abortion rights.

First Minister Foster’s refusal to stand down over the scandal of the wasted billions incensed Sinn Fein but it was the insult contained in the DUP’s high handed denial of a tiny bursary to allow disadvantaged children to learn Irish that was the last straw, precipitating Deputy First Minister Martin McGuinness’s resignation and the collapse of the Executive. It is extraordinary to reflect that just a few months ago he and Foster were claiming that they were sharing power successfully in the interests of all. This despite the fact that the DUP campaigned for Brexit, while Sinn Fein opposed it. The First and Deputy First Ministers of NI went together to see the British Prime Minister to argue opposite positions. She received both with equal indifference.

Sinn Fein is now talking like a partner newly escaped from an abusive marriage. It has suffered 10 years of arrogance and mockery, it says, despite all its valiant efforts to promote respectful dialogue and compromise. With McGuinness too ill to stand again, his successor, Michelle O’Neill has denounced Sinn Fein’s former partners in government as corrupt, sectarian, racist, homophobic and sexist, while she associates her own party with all the handsome old vocabulary of the Good Friday Agreement – integrity, parity of esteem, equality, human rights, diversity. Crocodiles, retorts Foster.

Meanwhile, Theresa May presses on with a process which will make the Irish border a frontier of the EU. All the indications are that this will be economically bad for the Republic and for the North, and nothing short of disastrous for the region on either side of the border – an area which is already the most disadvantaged on the island. A majority of people in NI voted to remain in the EU, not least because of a heavy reliance on the subsidies it has provided. However, whereas Scotland is working with urgency to build a coherent resistance to enforced Brexit, it has scarcely loomed into focus yet in political debates in Ireland, North or South. This despite the central role of the EU in the Peace Process and the fact that the apparatus of the EU, notably its human rights machinery, is an important part of the narrative of the Good Friday Agreement.

Sinn Fein has begun to propose that the obvious solution to the dilemma of Brexit and the failure of the institutions at Stormont is for Ireland to be united, the whole island then remaining in the EU. The Irish Taoiseach, Enda Kenny, has recently also begun to entertain this idea. It would be anathema to the DUP, which would like to dismantle even the weak cross border bodies set up under the Good Friday Agreement. The party’s former leader Peter Robinson once entertained building a fence along the border. (Mr Trump’s proposed wall provides an idiotic model should this idea be revived.)

Despite the loathing and the recriminations, few doubt that Sinn Fein and the DUP are the two parties which will have to sit down together post Thursday’s election, and put together a new programme for government. It is all but impossible to see how this can be done. Little help can be expected from the ineffectual James Brokenshire whose unfortunate name seems to be his only qualification for the role of Secretary of State for Northern Ireland.