The European Commission has announced that 'sufficient progress' has been made in the first phase of Brexit talks.
The European Commission has announced that "sufficient progress" has been made in the first phase of Brexit talks.
The announcement came after Theresa May and David Davis made an early-hours journey to Brussels to meet with European Commission President Jean-Claude Juncker and the European Union's chief Brexit negotiator Michel Barnier.
It followed talks which continued into the early hours between the Prime Minister and Democratic Unionist Party, Arlene Foster, whose party scuppered a deal at the eleventh hour on Monday.
Mrs Foster said that "substantial changes" to the text rejected on Monday would mean there was "no red line down the Irish Sea" in the form of a customs barrier between Northern Ireland and the rest of the UK.
Mr Juncker said that the decision on whether to move forward to talks on trade and the transition to a post-Brexit relationship was in the hands of the leaders of the 27 other EU nations, meeting in Brussels at a European Council summit on Thursday, but said he was "confident" they would do so.
The Commission president said: "I will always be sad about this development, but now we must start looking to the future, a future in which the UK will remain a close friend and ally."
Mrs May said that intensive talks over the past few days had delivered "a hard-won agreement in all our interests".
The Prime Minister said that the agreement would guarantee the rights of three million EU citizens in the UK "enshrined in UK law and enforced by British courts".
She said that it included a financial settlement which was "fair to the British taxpayer" and a guarantee that there will be "no hard border" between Northern Ireland and the Republic, preserving the "constitutional and economic integrity of the United Kingdom".
She said that the agreement between the UK and the Commission, being published in a joint report, would offer "welcome certainty" to businesses.
Under the terms of the negotiations being carried out under Article 50 of the EU treaties, the European Council must agree that sufficient progress has been made on the divorce issues of citizens' rights, the Irish border and the UK's financial settlement before talks can move on to the issues of trade and transition.
The publication of the 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.
It eases pressure on Mrs May, who was facing the prospect of businesses activating contingency plans to move staff and activities out of the UK if no progress had been made by the end of the year.
Mr Juncker cautioned: "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 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.
"We will take things one step at a time, starting with next week's European Council, but today I am hopeful that we are all moving towards the second phase of these challenging negotiations and we can do this jointly on the basis of renewed trust, determination and with the perspective of a renewed friendship."
Mrs May said that the negotiation process "hasn't been easy for either side".
"When we met on Monday, we said a deal was within reach," said the PM. "What we have arrived at today represents a significant improvement."
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."
She added: "The deal we've struck will guarantee the rights of more than three million EU citizens living in the UK and of a million UK citizens living in the EU.
"EU citizens living in the UK will have their rights enshrined in UK law and enforced by British courts. They will be able to go on living their lives as before."
On the issue of the UK's so-called "divorce bill", which is expected to total up to £50 billion, Mrs May said that in her landmark speech in Florence in September she had made clear the UK was "a country that honours our obligations".
She said: "After some tough conversations, we've now agreed a settlement that is fair to the British taxpayer. It means that in future we will be able to invest more in our priorities at home, such as housing, schools and the NHS."
And on the Irish issue, she 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".
Ireland's deputy prime minister Simon Coveney said the government was content at assurances it had achieved about avoiding a hard border. He said there was now "no scenario" that would result in new border checkpoints.
"Ireland supports Brexit negotiations moving to phase two now that we have secured assurances for all on the island of Ireland," he said.
He said the deal "fully protected" the Good Friday Agreement, the peace process and an all-Ireland economy.
Mrs May said that the agreement delivers on the principle, to which she and Irish prime minister Leo Varadkar committed themselves in talks on Thursday, that "there should be no barriers, either north/south or east/west".
She said she would write to the people of Northern Ireland on Friday to set out the approach.
Mrs May said she was "optimistic" about the trade talks which will stretch through much of 2018.
"In the meantime, reaching this agreement now ensures that businesses will be able to make investment decisions based on an implementation period that offers welcome certainty," she said.
Asked whether she had ever considered during negotiations that "maybe after all, this whole Brexit affair is a very bad idea", Mrs May said: "In 2016, the British people were given in a referendum the opportunity to choose whether to stay in the EU or not.
"Parliament was united across all parties in Parliament. A significant majority agreed that that decision would be given to the British people. The British people voted and they voted to leave the European Union.
"I believe it's a matter of trust and integrity in politicians. I believe the people should be able to trust that their politicians will put into place what they have determined. That's exactly what we are doing and we will leave the European Union."
Democratic Unionist Party leader Arlene Foster said "substantial progress" had been made from the text her party rejected on Monday.
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 told the Press Association.
"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".
Mrs May said that the major changes to the text of the agreement rejected by the DUP on Monday included "a strengthening of the commitments in relation to Northern Ireland and the United Kingdom".
On the thorny issue of jurisdiction over EU citizens' rights in the UK after Brexit, Mr Juncker said: "For EU citizens, the European Court of Justice will still be competent."
European Council president Donald Tusk confirmed that he has sent the leaders of the remaining 27 EU states proposed guidelines for a new mandate for chief negotiator Michel Barnier to begin negotiations on the transition period, as well as "exploratory talks" on the future trade relationship.
Mr Tusk said he was proposing that, during the transition period of around two years after March 2019, the UK should be required to respect EU law - including any new laws which are passed by the EU27 without British involvement - and to respect its budgetary commitments and the judicial oversight of the ECJ.
On trade, he said "more clarity" was needed from the UK on how it sees the future relationship after it has left the single market and customs union.
"We are ready to start preparing a close EU/UK partnership in trade, but also in the fight against terrorism and international crime as well as security, defence and foreign policy," said Mr Tusk, adding that this would require further guidelines to be drawn up next year.
He added: "While being satisfied with today's agreement, which is obviously a personal success for Prime Minister Theresa May, let us remember that the most difficult challenge is still ahead.
"We all know that breaking up is hard, but breaking up and building a new relation is much harder.
"Since the Brexit referendum, a year and a half has passed. So much time has been devoted to the easier part of the task, and now to negotiate the transition agreement and the framework for our future relationship we have de facto less than a year."