UK Prime Minister Theresa May will put a draft Brexit deal to her Cabinet on Wednesday after UK and EU negotiating teams made a crucial breakthrough in talks.

An agreement on preventing a hard Irish border was reached after two days of intensive talks.

Senior EU and UK sources told Business Insider there would be an emergency Cabinet meeting on Wednesday afternoon to discuss the deal.

The UK government confirmed a Cabinet meeting would take place at 2 p.m. on Wednesday.

May's government is braced for possible resignations.

The Democratic Unionist Party which props up the Conservative government said it "couldn't possibly vote" for the deal.

The leading Brexiteers Jacob Rees-Mogg and Boris Johnson described the agreement as unacceptable, while anti-Brexit MPs urged May to put it to another referendum.

LONDON — UK and EU negotiating teams have agreed on a Brexit withdrawal deal which Prime Minister Theresa May will present to her Cabinet on Wednesday.

The UK government confirmed reports that May's most senior ministers would read the details of the draft agreement on Tuesday evening before a special Cabinet meeting at 2 p.m. on Wednesday.

An agreement between the UK and EU over how to prevent a hard border on the island of Ireland as a result of Brexit was reached during intensive negotiations held on Monday and Tuesday, sources told Business Insider.

Brexit talks had for weeks been at an impasse over the question of how a hard border between Northern Ireland and the Irish Republic could be avoided no matter the outcome of negotiations.

UK and EU negotiators agreed that there would be a UK-wide "backstop" if they fail to negotiate a trade deal that negates the need for border checks on the island of Ireland before the end of the two-year Brexit transition period.

The backstop will take the shape of a UK-wide customs union with the EU, with Northern Ireland sticking to some of the European single market. This would guarantee no border checks between Northern Ireland and the Republic.

However, the backstop is set not to come with a fixed end date, as demanded by pro-Brexit MPs, but with a "review clause" for deciding when it can come to an end.

Brexiteers are concerned that this arrangement will leave the UK trapped in a customs union with the EU for years to come, unable to sign new free-trade deals. The UK would also have to continue following numerous EU rules in areas like the environment, employee protections and state aid.

Jacob Rees-Mogg, the leader of the European Research Group of pro-Brexit Conservative MPs, said the deal amounted to a "failure to deliver on Brexit" and would make a "vassal state" of Britain. His Conservative colleague Boris Johnson, the former foreign secretary, described the draft deal as "unacceptable," adding, "For the first time in a thousand years, this place, this Parliament will not have a say over the laws that govern this country."

Labour leader Jeremy Corbyn said his party would "look at the details" of the deal, "but from what we know of the shambolic handling of these negotiations, this is unlikely to be a good deal for the country."

He added: "Labour has been clear from the beginning that we need a deal to support jobs and the economy — and that guarantees standards and protections. If this deal doesn't meet our six tests and work for the whole country, then we will vote against it."

The breakthrough in negotiations means EU leaders might be able to ratify the deal at a summit in Brussels later this month. EU ambassadors are set to meet on Wednesday to discuss the next steps in the Brexit process.

The pound rose 1.4% against the dollar on the news on Tuesday.

UK Brexit Secretary Dominic Raab. WPA Pool/Getty

What's next?

Brexit Secretary Dominic Raab reportedly belongs to a handful of Cabinet Brexiteers who are prepared to resign from the government if the Brexit withdrawal agreement doesn't meet their demands.

Business Insider reported last month that the Cabinet members Andrea Leadsom, Penny Mordaunt, and Esther McVey were all prepared to resign if May accepted a backstop with no fixed end date.

Leadsom said on Sunday that MPs would not accept a backstop which the UK cannot leave without the EU's permission. She told the BBC: "I don't think something that trapped the UK in any arrangement against our will would be sellable to members of Parliament."

Downing Street understand that ministers could quit their positions over the details of the deal.

However, the prime minister has pressed on despite the high-profile resignations of former ministers like Johnson and David Davis and would be likely to do so again.

The European Research Group of pro-Leave Conservative MPs met following the news. A Tory MP who attended told Business Insider the group was "absolutely shell-shocked" because none of May's "promises" to it had been kept.

Trade Secretary Liam Fox, Leadsom, and Mordaunt "all campaigned with us for Brexit and need to stop this from ever reaching the Commons," the MP said.

The biggest challenge facing May will come in the House of Commons' vote on the deal.

Most Labour MPs are set to vote against it, as well as Conservative MPs from the pro-Brexit and pro-EU wings of the party, and possibly the 10 MPs from the Democratic Unionist Party which props up May's government.

The DUP's Nigel Dodds said the party "couldn't possibly vote for" the deal. Pro-Brexit Conservative MP Iain Duncan Smith said May's days are numbered as prime minister if she goes ahead with it.

Owen Smith, a champion of the anti-Brexit group Best for Britain, said the deal would leave "the British people worse off, and our country weaker as a whole" and urged May to put it to another referendum.

He added: "It's not enough for May to secure support for her deal from Cabinet, or even from Parliament. This deal will dictate the course for our country for generations to come, and it must be put to the people for their approval or rejection."

The leaders of the four main opposition parties, including Corbyn and The Liberal Democrats' Vince Cable, have jointly written to May demanding a "truly meaningful vote" on the deal.