When Martin McGuinness arrived in 10 Downing Street for his first talks with Tony Blair in the build-up to what became the Good Friday agreement, he looked at the cabinet room table and remarked: “So this is where all the damage was done.”

Blair and his aides thought McGuinness was referring to the IRA mortar attack on John Major and his cabinet in 1991. But he wasn’t. McGuinness was mulling the whirligig of history that had brought him to the very place where Sinn Féin’s Michael Collins signed the Anglo-Irish treaty in 1921 with David Lloyd George. That treaty partitioned Ireland and triggered a civil war in the south, in which Collins himself would perish.

Today’s agreement between Theresa May’s Conservatives and Arlene Foster’s Democratic Unionists will not have the bloody consequences of the 1921 treaty. Yet do not overlook the fact that this too is a Downing Street deal with massive implications for both parts of Ireland, as well as for British domestic politics.

On one level, it is possible to see the May-Foster deal as simply a piece of modern political pragmatism of a kind that is familiar in almost every parliamentary democracy in Europe. Government formation across Europe – from Germany to Greece, and from Scotland to Spain – operates in precisely this way.

In the Irish Republic itself, for example, the current Fine Gael minority government has exactly such a “confidence and supply” deal with Fianna Fáil. It means that, in return for its support on crucial issues such as the budget or confidence motions, Fianna Fáil has some influence over government bills and policies.

May and Foster have now cut an essentially similar deal. May’s Tories were eight seats short of a majority in the House of Commons after the election; the DUP has 10 MPs, giving May a majority of six.

Job done? May will certainly hope so. Everything that gives her the strength and stability she lost on 8 June helps to steady her ship and give her new government time to settle. Unless something goes very badly wrong on Thursday, the Queen’s Speech will now pass in the Commons.

Illustration by Ellie Foreman-Peck

But this deal shakes the pillars that uphold not just the politics of Britain but the politics of Ireland and Northern Ireland too. The price May has paid for it is hugely disruptive and potentially bankrupting – and will far exceed the £1bn price tag for the DUP’s offer of support in yesterday’s three-page agreement.

May now has to explain something tough and unpalatable not just to her party or her critics or to the devolved governments of Scotland and Wales, but to England, to NHS staff and to public service workers generally. She has to explain why the 1.8 million inhabitants of Northern Ireland, each of whom already receives more financial support from the British taxpayer than those in the rest of the UK, are entitled to another dollop of the extra public spending that has been so long denied to the other 63 million. In short, she has to explain why the millions who voted for change in Britain on 8 June are being denied the spending that those who voted for no change in Northern Ireland are receiving.

That’s a very hard political sell, especially to a disenchanted public. It challenges the meaning of the union it purports to uphold. Yet May has just handed a genuine material grievance to every single voter in Britain. It suggests she has her own magic money tree growing in her back garden. If ever there was proof of May’s potential for ineptitude, this is surely it. There is no guarantee that, with her popularity drained, her confidence blown, her rivals circling and her enemies closing in, she will get away with it.

Just as May’s manifesto proposals on social care collapsed at the first whiff of grapeshot a month ago, so it also remains perfectly possible that this deal will not survive the realisation in Britain that Foster’s voters are getting hospitals, schools, roads and farm spending that the rest of the country would also like a slice of. A public who are clearly fed up with austerity may simply not stand for it. It would be hard to argue that they should.

But the price of the deal could be even higher. The documents that were signed in Downing Street this morning go into considerable detail as to how the deal will work, what its aims are and where the DUP’s ransom money will be spent. It is much more vague about the political consequences in Northern Ireland and for the power-sharing arrangements there.

From left, Nigel Dodds, Arlene Foster, Theresa May and Damian Green watch Jeffrey Donaldson and Gavin Williamson sit and sign an agreement between the DUP and the Conservatives. Photograph: WPA Pool/Getty Images

Political common sense says that the Tories would surely not have done this trade with the DUP without ensuring that Northern Ireland nationalists were reconciled to the practical consequences in the province, and without ensuring that the Irish government’s anxieties were dealt with too.

That same common sense would also say that, before parting with £1bn, the Tories would want bankable guarantees from the DUP that the devolved executive and assembly, which have been suspended since January, will now be up and running again in short order.

Yet May’s recent record for political common sense is appalling. Why should it be any different this time? Assumptions that she will have squared things with nationalists and with Dublin don’t sit with the slow downward spiral of mutual trust between the DUP and Sinn Féin that has left Northern Ireland without a government this year. It is hard to believe Sinn Féin will stroll back into the arrangements after such a visible illustration of the DUP’s complicity with the Tories. What’s in it for them? Dublin’s cautious response today shows it is only too aware of all the pitfalls.

May never needed to do this deal. The DUP’s 10 MPs were never going to bring a Tory government down, least of all to hand the keys to Jeremy Corbyn’s Labour. Instead, May has given British voters a genuine grievance against Northern Ireland; given nationalists good reasons to mistrust power-sharing; undermined the UK’s status as an honest broker; worried our nearest and closest neighbour; and landed the Tories with an embarrassing alliance with a socially conservative party that threatens to make a mockery of Tory modernisation.

No good will come of it, and none deserves to, as May and Foster will both surely soon discover.