THERESA May is facing a growing backlash after it was confirmed a Brexit deal has finally been thrashed out following months of painstaking negotiations.

Officials said a draft agreement had been drawn up and agreed with Brussels, but critics immediately lined up to denounce the proposals before the details were even made public.

Leading Brexiteers insisted the plans made a “nonsense of Brexit” and would leave the UK a “slave state”.

Former Foreign Secretary Boris Johnson urged his colleagues to "chuck it out", and called on those who opposed the deal to resign.

Meanwhile, Jacob Rees-Mogg, chairman of the influential European Research Group of Tory MPs, insisted it represented a “failure of Brexit” that would reduce the UK to “not so much a vassal state anymore as a slave state”.

He said: "White flags have gone up all over Whitehall. It is a betrayal of the Union."

Nicola Sturgeon told MPs not to fall for Mrs May’s “spin” if it became clear the deal could not command a majority.

The First Minister, who has backed a so-called People's Vote on the final Brexit deal, urged politicians to instead vote it down and “get better options back on the table”.

SNP Brexit Secretary Michael Russell said it was “completely unacceptable” that Scottish ministers had still not seen any details, adding: “We must be able to scrutinise the deal and understand its implications.”

Last night, UK ministers were invited to Downing Street for one-to-one talks ahead of a special Cabinet meeting due to take place at 2pm today.

The meeting is expected to be a flashpoint for mounting tensions between Brexiteers and Remainers in Mrs May’s Government – with speculation further high-profile resignations could be on the way.

International Development Secretary Penny Mordaunt, Work and Pensions Secretary Esther McVey and International Trade Secretary Liam Fox are among those who may be prepared to walk out if a deal ties the UK too closely with Brussels.

Full details of the agreement are still to be released, but scrutiny will focus on its plans to avoid a hard border between Northern Ireland and the Republic.

Irish broadcaster RTE reported an overall "backstop" in the form of a UK-wide customs arrangement had been agreed to solve the thorny issue.

However it said deeper provisions for Northern Ireland on customs and regulations were also included.

Meanwhile, a mechanism to review the customs arrangement may not go far enough for Tory Brexiteers who want the UK to be able to unilaterally walk away.

The Democratic Unionist Party (DUP), which props up Mrs May’s Government, previously said any bid to treat Northern Ireland differently from the rest of the UK would be a “blood red” line it could not support.

Scottish Tory leader Ruth Davidson and Scottish Secretary David Mundell have also suggested they would resign over such a move, fearing it could undermine the Union and boost the independence movement.

Stephen Gethins, the SNP’s Europe spokesman, said any deal offering a closer relationship between Northern Ireland and the EU meant “the same can apply to Scotland”.

Officials were scrambling to reach a deal by today to allow a crucial summit of European leaders to go ahead at the end of the month, where the agreement will be signed off.

Any delay would force the UK to start spending a £2 billion no-deal contingency fund to protect food and medical supplies and keep ports open – as well as squeezing the overall timetable during which MPs can have a meaningful vote on any deal.

Last night, the SNP and other opposition parties at Westminster wrote a joint letter to Mrs May insisting amendments to this vote, which some MPs hope to use to push for a second referendum, must be allowed.

SNP Westminster leader Ian Blackford said: "Parliament must have the right to express its view on the terms of the UK's departure from the EU – and that means MPs must be able to consider, debate and vote on amendments prior to any substantive vote on the deal."

Despite mounting obstacles, Tory chief whip Julian Smith insisted he was confident the deal would get through Westminster.

He said: "I am confident that we will get this through Parliament and that we can deliver on what the Prime Minister committed to on delivering Brexit."

Meanwhile, Scottish Secretary David Mundell said ministers would have to "reflect on the detail" but described news of the breakthrough as "encouraging".

But ex-Tory leader Iain Duncan Smith suggested Mrs May's administration could collapse.

He warned that if reports were true, the Government would be “bringing back something that is untenable”.

He said: "If the Cabinet agrees it, the party certainly won't".

Nigel Dodds, deputy leader of the DUP, said it would leave Northern Ireland "subject to the rules and laws set in Brussels with no democratic input or any say".

He added: "If the reports are as we are hearing, then we can't possibly vote for that."

Labour leader Jeremy Corbyn said the party would vote against the deal if it failed to meet its tests.

A spokesman for Ireland's deputy premier Simon Coveney said: "We are not commenting on media speculation around the withdrawal agreement.”

It came as Labour used a Westminster vote to force the Government to publish its legal advice on the Irish backstop.

Elsewhere, Premier Foods, which owns Bisto, Oxo and Mr Kipling, confirmed it is now stockpiling goods as fears mount over the impact of a chaotic Brexit.