'We need to hope for the best but prepare for the worst.'

Sir John Major has warned Theresa May that the deal she is attempting to strike with the Democratic Unionist Party (DUP) in order to stay in Downing Street could put the Northern Ireland peace process at risk.

The former Conservative prime minister told the BBC on Tuesday afternoon he was “concerned”, “wary” and “dubious” about the proposed agreement.

He also said a deal with the DUP would cost the Conservative Party a “bucketload” of votes at future elections.

Sir John’s intervention came as May held talks with DUP leader Arlene Foster in No.10 with the goal of persuading her to prop up a Tory minority administration.

Under the terms of the 1998 Good Friday Agreement the UK government is expected to maintain “rigorous impartiality”.

Sir John said the prime minister was putting that in danger. “They will not be see not be impartial if they locked into a parliamentary deal with one of the Northern Ireland parties,” he told Radio 4’s World at One.

“And you never know in what unpredictable way events will turn out and we cannot know if that impartiality is going to be crucial at some stage in the future.”

“I think the peace process is fragile. People shouldn’t regard it as a given. It isn’t certain. It is under stress.”

Sir John said any return to violence was “somewhat down the road” but said it was “very important there is a honest broker” in Northern Ireland and only the UK government could take that role. “We need to hope for the best but prepare for the worst,” he said.

“The last thing we want to see is one or other of the communities so aggrieved that the hard men, who are still there lurking in the corners of the communities decide to return to some form of violence.”

The former Tory PM said rather than seeking a confidence and supply deal with the DUP, May should try to govern as a minority government.

He said May would still be able to win Commons votes as the conservative DUP would not vote to bring down a Tory government as that would increase the chances of another election resulting in Jeremy Corbyn’s Labour Party winning power.

“I’m not entirely convinced, that although ha deal would make parliamentary votes easier, that it is absolutely necessary for Mrs May to remain as prime minister,” he said.

Sir John also said there would be electoral consequences for the Tories as the DUP will “ask for money” to be sent to Northern Ireland which would trigger a backlash across the rest of the UK.

“They would see it as the government paying cash for votes in parliament. In doing so I think that could well cost votes in the country for the Conservative Party in the bucketload,” he said.

May’s authority has been severely diminished after a disastrous general election which saw her lose her Commons majority. A deal with the DUP’s 10 MPs would get her over the 326 MPs she needs.

A failure to gain support from the Northern Irish party would risk the Queen’s Speech being voted down next week, and Corbyn has said Labour will be pushing hard for that outcome.

The Tories and the DUP are considering an arrangement which would see the Northern Irish party back the government to get its Budget through and on confidence motions.

It comes after May told Tory MPs last night : “I’m the person who got us into this mess and I’m the one who will get us out of it.”