Theresa May has won a guarded welcome from fellow European leaders for proposals which could see three million EU citizens win the right to stay on in Britain after Brexit.
The Prime Minister presented outlines of her proposals to a Brussels summit of the European Council, where leaders of the other 27 countries also agreed a process to move EU banking and medicines regulators out of the UK after Brexit.
Mrs May's plan - coming on the eve of Friday's anniversary of the historic vote to take Britain out of the EU - would allow EU nationals who have been in the UK more than five years to claim a new "settled status" entitling them to similar rights as full British citizens.
Those who have been in the UK for a shorter time would be able to stay on until they hit the five-year threshold for settled status, while others who arrive after a cut-off date will be given a "grace period" - expected to be two years - to regularise their immigration status.
Speaking over dinner at the Brussels summit, Mrs May told leaders of the other 27 EU nations: "The UK's position represents a fair and serious offer and one aimed at giving as much certainty as possible to citizens who have settled in the UK, building careers and lives and contributing so much to our society."
She said the UK did not want anyone currently in Britain to be forced to leave.
German Chancellor Angela Merkel said the proposals represented "a good start", but cautioned that there were "many, many other issues" before Britain could reach agreement on a withdrawal deal.
But Dutch prime minister Mark Rutte said there were "thousands of questions to ask" about Mrs May's proposals, and Austrian Chancellor Christian Kern said the PM's proposals were "a first step" which did not cover the situations of many EU citizens in the UK.
The Prime Minister said she wanted to offer "certainty" to expats and ensure that families are not split up by Brexit.
But she made clear that the proposals would be adopted only if the same rights are granted to UK citizens living in the remaining 27 EU states in a reciprocal settlement.
And she set up a series of probable clashes with the European Union by suggesting she could set an early cut-off date for residency rights and rejecting a Brussels demand for the European Court of Justice (ECJ) to retain powers to enforce rights following Brexit.
Under Mrs May's plans, EU nationals with "settled status" will have the right to stay in the UK and receive healthcare, education, welfare and pensions as if they were British citizens.
The cut-off date for entitlement to apply is yet to be set, but will come between the day when Britain formally notified Brussels of its intention to quit on March 29 2017 and the day when it finally leaves, expected to be March 29 2019.
Mrs May also promised that the system will be streamlined, doing away with the 85-page permanent residency application form which has provoked loud complaints.
It is thought that the UK is reserving the option of setting an early cut-off for residency rights in case there is a late surge of migrants arriving as Brexit approaches.
But the introduction of a "grace period" raises the prospect that large numbers arriving during withdrawal negotiations may be allowed to remain.
And the outline deal leaves questions unanswered over whether individuals with settled status will be permitted to bring in children or spouses and whether the new status will be subject to conditions other than length of residency. Further details are expected in a Government paper on Monday.
Shadow Brexit secretary Sir Keir Starmer said: "The Prime Minister's offer is too little too late and falls far short of the full and unilateral guarantee Labour would make.
"We believe there must be a clear commitment that there will be no change to the status of EU nationals in the UK. This is not only the right thing to do, but it will also help deliver a reciprocal agreement for the 1.2 million UK nationals living in the EU."
Mayor of London Sadiq Khan, said Mrs May's plan "does not come close to fully guaranteeing the rights of EU nationals living in the UK".
And Liberal Democrat leader Tim Farron said the proposals "leave millions of people still facing unanswered questions over their futures here".
The package is likely to meet resistance in Brussels, which has already published its own formal proposals which would guarantee the rights enjoyed under EU law to any European expat resident in the UK on the date of Brexit.
Other than the different cut-off date, the key point of contention to be thrashed out in talks between Brexit Secretary David Davis and the EU's chief Brexit negotiator Michel Barnier is likely to be over the question of jurisdiction.
The EU proposals would give the ECJ "full jurisdiction" for as long as citizens' rights remain protected under the withdrawal agreement.
But Mrs May told her fellow leaders: "The commitment that we make to EU citizens will be enshrined in UK law and will be enforced through our highly respected courts."
Meanwhile, the president of the European Parliament said the UK's Brexit negotiating position was unclear following the inconclusive general election.
Antonio Tajani told BBC2's Newsnight: "Before the election the May position was very strong. Now I think in the UK the situation, the opinion is more flexible."