Some time in the last few months, the Irish Government turned its back on Remainers in the UK. It decided that Brexit was going to happen and that it should work with the new British government to achieve the best type of Brexit for Ireland. That required making a deal with the Boris Johnson government in a way it never did with Theresa May’s doomed administration.

This is both entirely proper and yet disappointing for lots of people who understandably hoped that Brexit could be stopped and that the Irish Government could have a role in stopping it.

Many campaigners for a second referendum in the UK took the view that “Ireland is the key”, as one of them told me during one of his visits to Dublin. By sticking to the backstop, the Remainers believed, Ireland could ensure that the deal would never be passed in Westminster. Parliament would stop a no-deal (they were right about that). And so a second referendum – possible and winnable, they thought – would become inevitable. And that might still happen. But it looks ever more unlikely.

Ireland was the key. If Dublin held firm, Brexit would crumble. And for a long time, Dublin did. The possibility of a compromise on the backstop (a time-limit, an exit clause, whatever) was discussed many times at the very top of government back when May was in the throes of her unsuccessful attempts to pass the first version of the withdrawal agreement. But either May didn’t know how to ask, or the Irish Government decided that a concession wouldn’t help her, or it listened to the Remainers. I’ve heard all three versions.

So Dublin held firm. The Remainers continued to plot and to hope. May fell. And then the election of Johnson changed things enormously. It heightened the fervid atmosphere among Brexiteers in the UK but it also put them in charge of the levers of power. May, struggling to keep her party together around compromises which increasingly stretched the bounds of practical and political reality, was weak, they thought. A Remainer at heart. Too concerned with the Irish. Boris would get the job done.

Mendacity and absurdity

Which he now stands on the brink of doing. Where earlier this year, the view in Irish Government circles tended to the view that Brexit might never happen, that it would collapse under the weight of his own contradictions, its mendacity and absurdity. But since the election of Johnson, that has now changed.

BREXIT: The Facts Read them here

One does not have to approve of Johnson to acknowledge the fact that he has been, on his own terms, politically successful. He has reopened an agreement he was told could not be touched, renegotiated a deal that was unrenegotiable and won a vote on it in parliament.

To see the world as it is, not as you would rather it were, is a facility that evades many in politics, as it does in life

Of course, Johnson got a deal by surrendering on the principle to which he had previously pledged unyielding fealty: that Northern Ireland should leave on the same terms as the rest of the UK. Even students of the long history of the use and abuse of Ulster unionism by British governments were taken aback at the brazenness of his U-turn. No, this was not a negotiating coup: it was a political one.

He has reunited his party behind the deal. He has lied and betrayed. He has dissembled and deceived. But, like it or not, he has brought verve and vigour to Downing Street and the political momentum is moving in his direction. And Dublin knows it.

To see the world as it is, not as you would rather it were, is a facility that evades many in politics, as it does in life. Recognising that Johnson’s ascension to power had changed British politics profoundly was a clear-sighted judgment by the officials and politicians who have led Ireland through the unfinished maelstrom of Brexit. Once this judgment was made, they moved to act on it.

Varadkar’s statecraft

Leo Varadkar believes one-to-one encounters between the leaders of countries are an important part of statecraft. He usually tries to schedule private time with a foreign leader, without officials, during bilateral meetings. He has done so twice with Johnson, in Dublin and the Wirral, the second time at considerable length.

If Remainers are going to stop Brexit, they’ll have to beat Johnson in a general election first and then win a referendum

The Taoiseach’s habits in this regard alarm senior civil servants, who are temperamentally and culturally suspicious of politicians alone in a room deciding anything. (Though, quips one political adviser, “[Martin] Fraser and [John] Callinan [the two most senior officials in the Department of the Taoiseach, the latter the Government’s Brexit supremo] reckon they can clear up any mess afterwards anyway.”) But the Varadkar-Johnson meetings were pivotal.

After the first meeting, Varadkar emerged and told his officials: I believe he wants a deal. The second one broke the deadlock. Johnson conceded separate treatment for the North, Varadkar dropped the backstop. That asymmetrical give-and-take enabled a new withdrawal agreement with which the UK will almost certainly now leave the EU.

Boris Johnson’s 19th-century predecessor, Lord Palmerston, observed that nations do not have permanent alliances; only permanent interests. It is surprising the UK has not been able to appreciate the fact that Ireland has national interests, and will act to defend them. First Ireland’s clear-eyed independence surprised and confused the Brexiteers; now it has done the same to the Remainers, who have been lately venting their anger at Dublin.

“They’re not happy,” says one Government insider. “But we were never going to fix Brexit for them.”

Shrugs another, “Look, we deal with the British government.”

If Remainers are going to stop Brexit, they’ll have to beat Johnson in a general election first and then win a referendum. To the Irish Government and the EU, that now looks very unlikely.