The European Union and the UK have reached a deal in the first phase of the Brexit talks.
Here are the key points from the agreement between the UK and the Commission, which has been published in a joint report.
More than three million EU citizens will be allowed to live and work in the UK in line with current freedom of movement principles.
The deal will also protect the rights of those who are yet to be granted permanent residency in the UK so that they can still acquire it after withdrawal.
The deal will include reunification rights for relatives, including spouses, parents, grandparents, children and grandchildren, who do not live in the UK, to join them in the future and will extend to future spouses or partners of EU citizens even if they are not yet together as of the end of any transitional period after withdrawal.
The guarantees outlined in the document will also apply to UK citizens living in countries within the union.
Parliament will bring in new legislation to enshrine the citizens' rights in the final withdrawal agreement into UK law but notes it could be repealed in the future
The European Court of Justice
The report says that the European Court of Justice (ECJ) will continue to have a role in overseeing EU citizens' rights in the UK for eight years after withdrawal.
The UK must establish a mechanism enabling courts and tribunals to ask the ECJ for "interpretation of those rights where they consider that a (ECJ) ruling on the question is necessary for the UK court or tribunal to be able to give judgment in a case before it".
In applying and interpreting EU citizens' rights, UK courts will have "due regard to relevant decisions" of the ECJ after the date of withdrawal.
The 'divorce bill'
The report does not specify a figure for the UK's financial settlement, but a senior UK source said the figure would be around £35 to £39 billion.
The agreement says the UK will continue to make contributions to the EU budget up to the end of 2020 "as if it had remained in the Union".
It will also remain liable for its share of outstanding financial commitments and liabilities up to December 31, 2020.
The financial settlement "will be drawn up and paid in euro".
The Irish border
The UK will remain fully aligned to EU rules supporting Irish cross-border arrangements if no deal can be agreed.
Without an agreed solution the UK will maintain "full alignment" with EU internal market and Customs Union provisions which underpin North-South co-operation, the all-island economy and the protection of the 1998 Good Friday Peace Agreement which largely ended decades of Northern Ireland violence, the text disclosed.
The UK said it "remains committed" to protecting North-South co-operation and its guarantee of avoiding a hard border.
The joint report from EU and UK negotiators confirmed: "Any future arrangements must be compatible with these overarching requirements."
In a crucial passage, which appears to have been added to satisfy the concerns of the DUP about Monday's text, it says: "In the absence of agreed solutions...the United Kingdom will ensure that no new regulatory barriers develop between Northern Ireland and the rest of the United Kingdom, unless, consistent with the 1998 Agreement, the Northern Ireland Executive and Assembly agree that distinct arrangements are appropriate for Northern Ireland.
"In all circumstances, the United Kingdom will continue to ensure the same unfettered access for Northern Ireland's businesses to the whole of the United Kingdom internal market."
Here is the joint report published by the negotiators in full:
In a tweet posted on Friday morning, Mrs May wrote: "I've consistently said that we want to build a deep and special partnership with the EU as we implement the decision of the British people to leave in March 2019.
"Today’s deal will provide clarity and certainty for UK business and for all our citizens."