Mrs May agreed a loose alliance with the Northern Irish Democratic Unionist party (DUP) yesterday to prop up her government. I believe this is a terrible mistake with lasting consequences and not just for the very valid reasons raised by Ruth Davidson, leader of the Scottish Tories, about the DUP’s attitudes to LGBTI rights.

Since 1990, the British government has been neutral in Northern Ireland, backing neither the unionists nor the nationalists. Peter Brooke, the Tory Northern Ireland secretary at the time, made a speech saying Britain had no selfish strategic or economic interests in Northern Ireland. Our aim since then has been to find an agreement that both sides could live with.

That was the basis for the peace negotiations in Northern Ireland, which allowed us to be an honest broker between the sides and reach the Good Friday agreement in 1998. And it has been the basis ever since under which we have resolved problems between unionists and nationalists that have disrupted the implementation of the peace agreement that ended 30 years of war.

No British government since then, Conservative or Labour, has chosen sides. Even John Major, when his political support in the House of Commons was at its most parlous, never took the step of relying on unionist MPs to save his government because he knew that to do so would make it impossible for him to play the role of mediator in Northern Ireland.

We have had a political crisis in Northern Ireland since the collapse of the executive last year over a heating scandal implicating Arlene Foster, the leader of the DUP. The government, together with the Irish government, has been trying to resolve the standoff by bringing the two sides together in talks. So far, they have not succeeded but when the dust has settled after the election they will have to try again. If they fail, the choice is between direct rule from Whitehall, which is considered illegitimate by nationalists and the Irish government, or new elections, which nobody wants.

DUP leader Arlene Foster. Photograph: Charles McQuillan/Getty Images

If Mrs May depends on the DUP – Ian Paisley’s party, not the old Official Unionists, who used in the past to work with the Tories – to form a government, it will be impossible for it to be even-handed. The other parties in Northern Ireland will know that the unionists can pull the plug at any stage and hold the government hostage.

If the British government cannot play the role of mediator it is not obvious who can. A previous attempt to use a distinguished American diplomat failed because only the British and Irish governments have the levers to cajole the parties into an agreement. Failure to reach agreement will catapult Northern Ireland into a serious crisis and back on to our front pages, where it has been happily absent for 20 years.

I know that Mrs May is desperate to find some way to cling on to power in Westminster, but I appeal to her to reconsider doing so propped up by one side from Northern Ireland politics. Doing so would risk undermining 20 years of hard work in trying to reach a lasting settlement.

Jonathan Powell was chief negotiator in Northern Ireland from 1997 to 2007

Comments will be opened later