Video report by ITV News Europe Editor James Mates
The European Union and the UK have reached a deal in the first phase of the Brexit talks.
"Sufficient progress" has been made to move discussions onto trade and the transition to a post-Brexit relationship, the European Commission is recommending to the European Council.
“I believe that we have now made the breakthrough that we needed,” European Commission President Jean-Claude Juncker said.
The leaders of the 27 other EU nations will now decide next week whether to allow talks to move forward.
At a joint press conference with Theresa May early on Friday morning, Mr Juncker said he was "confident" they would do so.
Involves Britain paying a "divorce bill" of around £35 to £39 billion, according to a senior UK source
Avoids a "hard border" between Northern Ireland and the Republic
Provides reciprocal protection for EU citizens in the UK and Britons living in the remaining 27 member-states who are resident at the time of the UK's withdrawal, along with their family members
Means the European Court of Justice will continue to have a role overseeing the rights of EU citizens in the UK for eight years after Brexit
Mrs May said: "I very much welcome the prospect of moving ahead to the next phase, to talk about trade and security and to discuss the positive and ambitious future relationship that is in all of our interests."
European Council President Donald Tusk said that "the most difficult challenge is still ahead", adding: "Breaking up is hard. But breaking up and building a new relationship is much harder."
ITV News Political Editor Robert Peston believes the Brexit deal has left Theresa May in a stronger position than she has been in weeks.
The agreement between the UK and the Commission, being published in a joint report, makes it all but certain that EU27 leaders will approve this step on Thursday, marking a significant step forward in the process leading towards UK withdrawal in March 2019.
The final details were thrashed out in the early hours of Friday by Mrs May and Democratic Unionist Party leader Arlene Foster, who blocked a previous version of the agreement on Monday with her last-minute objection to provisions she feared would create a customs border between Northern Ireland and the mainland.
Mrs Foster said "substantial changes" to the text would mean there was "no red line down the Irish Sea" and no "special status" for Northern Ireland.
Labour leader Jeremy Corbyn called for more detail on the agreement and criticised how long it had taken to reach the deal, saying: "This could all have been done 18 months ago."
Read the joint report published by the EU and UK negotiators:
The prime minister said the agreement would guarantee the rights of three million EU citizens in the UK "enshrined in UK law and enforced by British courts".
On the issue of the divorce bill, Mrs May said that the deal included a financial settlement which was "fair to the British taxpayer".
The UK will be required to continue contributions to the EU budget up to the end of 2020 "as if it had remained in the Union", and will be liable for its share of outstanding financial commitments and liabilities up to that date.
On the Irish issue, Mrs May said the UK would "guarantee there is no hard border and uphold the Belfast Agreement, and in doing so, we will continue to preserve the constitutional and economic integrity of the United Kingdom".
The joint report says that in the absence of an overall trade deal, the UK will maintain "full alignment" with elements of the EU single market and customs union which support the economy of the island of Ireland and the Good Friday Agreement.
Mrs May added that the agreement between the UK and the Commission would offer "welcome certainty" to businesses.
Senior pro-Brexit ministers Boris Johnson, David Davis and Michael Gove welcomed the deal.
Mr Juncker cautioned that the joint report "is not the withdrawal agreement".
"That agreement needs to be drafted by the negotiators on the basis we have agreed yesterday and today and then approved by the Council and ratified by the UK Parliament and European Parliament," he said.
He said that he and Mrs May had discussed the need for a transition period following the formal date of Brexit, and shared "a joint vision of a deep and close partnership".
"It is crucial for us all that we continue working closely together on issues such as trade, research, security and others," he said.
European Council president Donald Tusk confirmed he has sent the EU27 proposed guidelines for a new mandate for chief negotiator Michel Barnier to begin discussions on the transition period, as well as "exploratory talks" on the trade relationship.
He called for "more clarity" from the UK over its hopes for trade relations.
Under his proposals, during the transition period of around two years after March 2019, the UK would be required to respect EU law - including any new laws passed by the EU27 without British involvement - and to observe its budgetary commitments and the judicial oversight of the ECJ
Mrs May and Brexit minister David Davis arrived in Brussels to meet with Mr Juncker and Mr Barnier shortly before 6am GMT.
The meeting followed a flurry of diplomacy by Mrs May late on Thursday.
Ahead of the press conference in a sign that a deal had been done, Mr Juncker's head of cabinet Martin Selmayr tweeted a photograph of white smoke gushing from the chimney of the Sistine Chapel - the traditional way of signalling that a new Pope has been chosen.
The Irish issue
A deal appeared to have been done on Monday, but a mooted agreement between the UK and EU was torpedoed by the DUP.
The party, who are propping up the minority Conservative government, objected to plans for "regulatory alignment" between Northern Ireland and the Republic to maintain a soft border between the two, arguing it would amount to the drawing of a new frontier with the UK mainland in the Irish Sea.
On Friday, DUP leader Arlene Foster said "substantial progress" had been made from the text her party rejected on Monday.
Ireland's Taoiseach Leo Varadkar said the Brexit deal had "achieved all we set out to achieve", adding: "This is not the end, it is the end of the beginning."
Mrs Foster, who negotiated directly with Mrs May into the early hours of Friday, said Northern Ireland would now leave the single market and customs union and insisted there would be no border down the Irish sea, dividing Northern Ireland with the rest of the UK.
"There will be no so-called 'special status' for Northern Ireland as demanded by Sinn Fein," she said.
"Northern Ireland will not be separated constitutionally, politically, economically or regulatory from the rest of the United Kingdom and the joint UK-EU report at the conclusion of phase one makes clear that in all circumstances the United Kingdom will continue to ensure the same unfettered access for Northern Ireland's businesses to the whole of the UK internal market."
But the DUP leader made clear there was "still more work to be done".
Mr Varadkar said it was a "significant day" for Ireland and that their focus would now move to phase two of the negotiations.
He said his government would remain "fully engaged and vigilant" throughout the process and that he wanted to assure unionists of his motivations.
"There is no question of us trying to exploit Brexit to move toward Irish unity without consent," Mr Varadkar said.