Image copyright Reuters Image caption Ministers were being briefed individually on the draft agreement

UK and EU officials have agreed the draft text of a Brexit agreement after months of negotiations.

A cabinet source told the BBC that the document has been agreed at a technical level by officials from both sides after intensive discussions this week.

A special cabinet meeting will be held at 14:00 GMT on Wednesday as Theresa May seeks ministers' backing.

The PM has been meeting ministers in Downing Street for one-to-one talks on the draft agreement.

BBC political editor Laura Kuenssberg said the agreement contained a UK-wide customs "backstop" aimed at preventing new border checks in Northern Ireland.

There is no additional Northern Ireland-only backstop - but sources wouldn't be drawn on any specific arrangements for Northern Ireland on rules and regulation within the UK-wide one, she added.

This "backstop" has proved to the most contentious part of the withdrawal negotiations, with concerns raised by Brexiteer Tories and the DUP over how it will work.

The pound surged against the dollar and the euro following the negotiations breakthrough - but analysts warned it could be short-lived, with the cabinet and Parliament yet to agree to the plans.

The EU said it would "take stock" on Wednesday, while the Irish government said negotiations were "ongoing and have not concluded".

Leading Brexiteers, such as Boris Johnson and Jacob Rees-Mogg, immediately criticised what has been reported to be in the draft agreement, saying it would keep the UK under EU control.

Northern Ireland's Democratic Unionist Party, which gives Theresa May vital support in key votes, said it would be a "very, very hard sell".

But Conservative Chief Whip Julian Smith said he was "confident" it would pass when put to a crucial Commons vote, and Transport Secretary Chris Grayling called for "a little bit of calm" before the cabinet gives its verdict on Wednesday.

Both the UK and EU hope to be able to schedule a special summit of European leaders at the end of November to sign off the deal.

What's been agreed?

The details of the draft agreement have not been published, so we don't know the small print yet.

But it is made up of a withdrawal agreement - said to run to 500 pages - alongside a statement about what the UK and EU's future relationship will look like.

The withdrawal agreement includes how to guarantee there will not be physical border checks reintroduced in Northern Ireland - the major sticking point in recent weeks.

Some Brexiteers fear the likely arrangement will keep the UK locked into EU trade rules for years to come in order to maintain a frictionless border.

The agreement also includes commitments over citizens' rights after Brexit, a proposed 21-month transition period after the UK's departure on 29 March 2019 and details of the so-called £39bn "divorce bill".

The future relationship statement is expected to be far shorter, with the UK and the EU's long-term trade arrangements yet to be settled.

No 10 said ministers were now being called to a special meeting to "consider the draft agreement the negotiating teams have reached in Brussels, and to decide on next steps".

Before they do so, they will be able to read relevant "documentation".

What does the cabinet do now?

By BBC political editor Laura Kuenssberg

Image copyright Getty Images

It doesn't seem to me that many of the cabinet are likely to walk on Wednesday over what's in the document.

It's suggested that those with bigger doubts are more likely to cause problems for the prime minister because it won't get through Parliament.

One source told me senior ministers are thinking not just about the wisdom of backing a deal they don't like because it's a sour compromise, but whether it is folly to back a deal they believe can't get through Parliament.

Slamming on the brakes now would force a crisis, but it could be less serious than the political disaster of pursuing this plan to an eventual calamitous defeat that could take them all down.

Who doesn't like it?

Former foreign secretary Mr Johnson said the plan would see the UK remain in the customs union and "large parts" of the single market.

He told the BBC it was "utterly unacceptable to anyone who believes in democracy" and he would vote against it.

Mr Rees-Mogg warned of the UK becoming a "vassal state" with Northern Ireland "being ruled from Dublin".

Sorry, this Twitter post is currently unavailable.

Labour leader Jeremy Corbyn said "given the shambolic nature of the negotiations, this is unlikely to be the good deal for the country."

Pro-EU Conservative MP Justine Greening said the agreement would leave the UK with less influence and undermine its credibility.

Speaking at a rally calling for another EU referendum to be held, she said: "Even if some people in my party can't see this is a bad deal, everyone else around this entire planet can."

Image copyright Getty Images Image caption At the rally, former minister Jo Johnson was interviewed by Match of the Day host Gary Lineker

Former Transport Minister Jo Johnson told the audience at a packed Westminster Hall that cabinet ministers were "looking deep into their consciences" about whether to support the deal.

Mr Johnson, who quit his ministerial role last week over Brexit policy, added: "The whips are going to tighten the thumbscrews on all our colleagues across Parliament in all parties probably, so it is very hard to predict."

The view from the EU

BBC Europe editor Katya Adler

Brussels is keeping schtum this evening. This doesn't mean that nothing's going on. Those in the know simply prefer to keep quiet at this sensitive stage.

It seems what is being described to me as a "mutual understanding" has indeed been reached on a technical level between EU and UK Brexit negotiators.

This is not yet a deal. All eyes are now on the UK cabinet. If ministers reject the draft, then it's back to the drawing board.

If they approve it, then the 27 EU ambassadors scheduled to meet tomorrow may be told by the European Commission that decisive progress has been made in negotiations, meaning a Brexit summit could be convened with Theresa May, possibly in less than two weeks' time.

First though, all 27 EU countries and the European Parliament will want to pore over the text. And that won't be with an uncritical eye.

Meanwhile, following pressure from all sides of the Commons, ministers have agreed to provide MPs with a legal assessment of the implications for the UK of the Irish backstop and other controversial aspects of any deal.

Cabinet Office minister David Lidington said Attorney General Geoffrey Cox would make a statement to MPs and take questions ahead of the final vote on any Brexit deal.

MPs, he said, would get to see "a full reasoned position statement laying out the government's both political and also legal position on the proposed withdrawal agreement".