The UK and EU agree terms for Brexit transition period
The UK and EU have agreed on a "large part" of the agreement that will lead to the "orderly withdrawal" of the UK.
Negotiators Michel Barnier and David Davis said the deal on what the UK calls the implementation period was a "decisive step" in the Brexit process.
But issues still to be resolved include the Northern Ireland border.
And Scotland's fishing industry has reacted angrily to the deal, which will see the UK "consulted" on quotas and access to its waters until 2021.
Brexit Secretary Mr Davis said Monday's transition agreement, which is conditional on both sides agreeing a final withdrawal treaty, would smooth the path to a future permanent relationship.
- Laura Kuenssberg: Done deal but work ahead
- EU fishing deal 'far from acceptable'
- Brexit: All you need to know
Mr Barnier said the legal text marked a "decisive step" but added that it was "not the end of the road".
The key aspects of the agreement announced in Brussels are:
- The transitional period will last from Brexit day on 29 March 2019 to 31 December 2020
- EU citizens arriving in the UK between these two dates will enjoy the same rights and guarantees as those who arrive before Brexit. The same will apply to UK expats on the continent
- The UK will be able to negotiate, sign and ratify its own trade deals during the transition period
- The UK will still be party to existing EU trade deals with other countries
- The UK's share of fishing catch will be guaranteed during transition but UK will effectively remain part of the Common Fisheries Policy, yet without a direct say in its rules, until the end of 2020
- Northern Ireland will effectively stay in parts of the single market and the customs union in the absence of other solutions to avoid a hard border with the Republic of Ireland
The EU says this so-called "backstop option" for Northern Ireland was a key part of December's phase one agreement with the UK and must continue to apply "unless and until another solution is found".
Theresa May has suggested this outcome - which is favoured by Dublin - would be unacceptable as it would effectively shift the existing land border to the Irish Sea and compromise UK sovereignty.
In a letter to the European Council President Donald Tusk, the prime minister said "more work" was needed on certain commitments included in December's agreement and she continued to believe safeguards for Ireland could be agreed as part of the overall future economic and security partnership.
Should this not prove possible, she said she was committed to discussing "additional specific solutions" in parallel with the existing legal process for the UK's withdrawal.
Both the UK and the EU hope the terms of an agreement on the transitional period can be signed off by Mrs May's fellow 27 leaders at the EU summit this week.
The UK has said it had secured a number of improvements to the text, including an explicit reference to Gibraltar being covered by the agreement and the creation of a joint committee to oversee the process.
"We must seize the moment and carry on the momentum of the last few weeks," Mr Davis said. "The deal today should give us confidence that a good deal for the UK and EU is closer than ever before."
- No Brexit agreement on Irish border
- 'Extend transition' call divides MPs
- What is the Brexit 'transition' phase?
Labour's shadow Brexit secretary Keir Starmer said the agreement was "a step in the right direction" but Scotland's First Minister Nicola Sturgeon tweeted that the agreement for fishing during the implementation period was "shaping up to be a massive sell-out of the Scottish fishing industry by the Tories".
She added: "The promises that were made to them during #EUref and since are already being broken - as many of us warned they would be."
Bertie Armstrong, chief executive of the Scottish Fishermen's Federation, said the agreement fell "far short of an acceptable deal" giving the UK full control of its waters from the moment it leaves.
"We will leave the EU and leave the Common Fisheries Policy, but hand back sovereignty over our seas a few seconds later," he said. "Our fishing communities' fortunes will still be subject to the whim and largesse of the EU for another two years."
Downing Street said that because fishing quotas are worked out on an annual basis, for the period from 2020 onwards, the UK would be "negotiating fishing opportunities as an independent coastal state deciding who can access our waters and on what terms".
Monday's document clearly states the European Court of Justice will have "jurisdiction" over matters relating to EU law and EU citizens during the transition - once regarded as a "red line" by many Brexit-supporting MPs.
As well as questions about Northern Ireland, there are unresolved issues about what role, if any, the ECJ will have after the transition and other governance issues.
The UK and EU hope that if a transition deal is agreed, then negotiations can focus on what sort of permanent future relationship the two sides will have - with the aim of a deal being agreed in the autumn to allow time for EU member states and the UK Parliament to ratify it before Brexit next March.