Theresa May will urge EU leaders in Brussels on Wednesday to keep the door open to continuing Brexit negotiations, after a two and a half hour cabinet meeting that underscored the challenge of bridging the gap between London and Brussels in the days ahead.

May told her colleagues on Tuesday: “If we as a government stand together and stand firm, we can achieve this.”

But a string of ministers intervened to stress the importance of time-limiting the Irish backstop and ensuring it did not separate Northern Ireland from the rest of the UK – both areas where the UK and the EU27 remain at loggerheads.

The attorney general, Geoffrey Cox, said any Northern Ireland-only arrangements for customs after Brexit could mean the province was “torn out of the UK” and leave it “controlled by the EU,” according to one source.

No 10 said cabinet members endorsed May’s call to “maintain the integrity of the union” between Great Britain and Northern Ireland, which the prime minister told the cabinet was threatened by the EU’s proposed version of the backstop.

The spokesman said the prime minister had told her political colleagues it was “not possible for her or any UK prime minister to sign up to an arrangement that would lead to a customs border down the Irish Sea”.

One cabinet minister said: “There was a general wish to get the DUP onside, which hopefully our robust line on the integrity of the UK will help with.”

The chief whip, Julian Smith, told ministers that the prime minister would not get House of Commons approval for a backstop that could apply indefinitely.

Cabinet Brexiters believe May’s chief negotiator, Olly Robbins, was prepared to sign up to fresh compromises on Sunday, before the Brexit secretary, Dominic Raab, arrived in Brussels and rejected the latest proposals.

Michael Gove reportedly insisted at Tuesday’s meeting that the government must take legal advice on the implications of any fresh backstop text, which will be enshrined in the withdrawal agreement.

Complaining that the significance of the backstop had been underplayed by officials in December, Gove told colleagues: “Fool me once, shame on you; fool me twice, shame on me.” He warned that if the government accepted getting on the, “customs union train,” it would need to know “when to get off”, according to Tory sources.

Others insisting on assurances that the UK could not become trapped in a customs union indefinitely included Jeremy Hunt, Penny Mordaunt and Andrea Leadsom, sources said.

With May accepting the principle, and no draft text for ministers to scrutinise, there were none of the feared resignations, but the demand for legal advice could limit negotiators’ wriggle room in the days ahead.

Drafting a time-limited backstop creates a formidable conundrum for negotiators because the December agreement, signed up to by both sides, said it must operate “unless and until” alternative arrangements that prevent a hard border had been put in place.

May’s official spokesman said cabinet members had agreed the UK “cannot be kept in the backstop indefinitely” and ministers had discussed “the need for a mechanism to clearly define how that backstop will end”.

Brussels-watchers say any mechanism controlled by the UK would be anathema in Brussels. Mujtaba Rahman, of Eurasia Group, said: “It’s simply inconceivable that the EU will hand the UK the right to exit the backstop at a time of the UK’s choosing.”

Quick guide Brexit and backstops: an explainer Show Hide A backstop is required to ensure there is no hard border in Ireland if a comprehensive free trade deal cannot be signed before the end of 2020. Theresa May has proposed to the EU that the whole of the UK would remain in the customs union after Brexit, but Brussels has said it needs more time to evaluate the proposal. As a result, the EU insists on having its own backstop - the backstop to the backstop - which would mean Northern Ireland would remain in the single market and customs union in the absence of a free trade deal, prompting fierce objections from Conservative hard Brexiters and the DUP, which props up her government. That prompted May to propose a country-wide alternative in which the whole of the UK would remain in parts of the customs union after Brexit. “The EU still requires a ‘backstop to the backstop’ – effectively an insurance policy for the insurance policy. And they want this to be the Northern Ireland-only solution that they had previously proposed,” May told MPs. Raising the stakes, the prime minister said the EU’s insistence amounted to a threat to the constitution of the UK: “We have been clear that we cannot agree to anything that threatens the integrity of our United Kingdom,” she added.

Cabinet members had been urged to rise up and rebel against the prime minister’s Brexit strategy by the former Brexit secretary David Davis over the weekend.

Cabinet members including Andrea Leadsom, the leader of the House of Commons, have privately said the UK should insist on a firm date for ending the backstop.

Similar concerns were voiced by Conservative Brexiters in the Commons on Monday, when May updated MPs on the status of the Brexit negotiations, with the former work and pensions secretary Iain Duncan Smith asking the prime minister: “How long does she think this temporary arrangement might last and, most importantly, who would make the final decision on when it ends?”

A backstop is required to ensure there is no hard border in Ireland if a comprehensive free-trade deal cannot be signed before the end of 2020. May has suggested to the EU that the whole of the UK would remain in the customs union after Brexit, but Brussels has said it needs more time to evaluate that proposal.

As a result, the EU is continuing to insist on having its own backstop, which would mean Northern Ireland remaining in the single market and customs union in the absence of a free-trade agreement, prompting fierce objections from Tory hard Brexiters and the Democratic Unionist party, which props up her government.

The shadow Brexit minister, Jenny Chapman, said: “It is simply extraordinary that the cabinet can’t agree what its plan for Brexit is. If the cabinet can’t make a decision on Brexit, then what on earth is the point of it? Theresa May is in office, not in power.”