The rights of 3.5 million EU citizens living in the UK and 1.2 million UK nationals living in EU countries is one of the key issues of the Brexit negotiations that needs to be tackled in the withdrawal agreement, which will set the basic rules for life after Brexit.
The UK and EU have published a number of papers, outlining their position on the key debates in the Brexit negotiations. Both sides agree, however, that any deal on citizens' future legal status and rights must be reciprocal. Nevertheless, the EU's chief negotiator, Michel Barnier, warned after the second round of negotiations that "fundamental divergences" remain on the issue of citizens' rights.
Volunteer groups, advocating for EU and UK citizens, are pushing for a ring-fenced and swift agreement between the EU and UK, so that they can continue to live with certainty. "We need real guarantees for our people who live, work and study in the UK, and the same goes for Brits", said Donald Tusk, the president of the European Council.
This issue concerns a great number people, with some 1.2 million UK nationals living in EU countries, and 3.5 million EU citizens in the UK.
EU position: Lifetime guarantee of rights for EU-27 citizens who reside in the UK when the withdrawal agreement enters into force, and for UK citizens who reside in one of the EU-27 countries. This also applies to their current and future family members, who have already joined them, or will join them, regardless of their nationality.
UK position: EU nationals who have been living in the UK for five years should receive a new "settled status" in a streamlined process. People who have been legally resident in the UK for less than five years at the time of Brexit will have to apply for a temporary status in order to stay.
Free movement: The EU argues that UK citizens should only have protected rights in the state in which they have residence rights on Brexit day. Meanwhile, the UK says that, after Brexit, free movement will end, but migration between the UK and the EU will continue.
Residence: The UK would scrap the requirement to have "comprehensive sickness insurance" for self-employed workers to seek residency and settled status, and would streamline the application process.
Right to equal treatment: Based on the principle of non-discrimination on the grounds of nationality, this right should be recognised both by the EU and the UK.
Right to work: Those with "settled status" should have access to employment in the UK.
Right to study: Those with "settled status" should have access to education in the UK. Britain says that current EU-27 students will continue to have access to loans, and those who apply for a course up until 2018/19 will be allowed to stay to finish their studies.
Qualifications gained before the UK leaves will continue to be recognised. However, It is unclear what will happen to students once they have finished their studies.
Healthcare: Those with settled status should have access to treatment in the UK, the British government says.
Benefits: The UK would allow EU nationals to send welfare payments to family members who reside elsewhere.
Pensions: The UK pledged to index-link EU nationals' pensions, and continue paying pensions to British citizens living in the EU-27, but that will no longer be guaranteed by EU law.
Voting rights: The UK proposes that the right to stand and/or vote in local elections in the country of residence should remain, but does not mention in its proposal whether EU nationals with "settled status" will be able to vote in local UK elections. The EU objects because this right is derived from EU law and citizenship rights.
Family reunions: The EU wants broad rights for citizens to bring current and future family members to the UK (even if they are non-EU citizens).
London says, however, that EU nationals who marry after the Brexit date will lose their right to bring family members to the UK unless they pass a minimum income test, which is required of UK citizens who want to bring in non-EU family members.
Family members who join a "qualifying" EU citizen in the UK before Brexit will be able to apply for "settled status" after five years, the UK position paper states.
Right to leave and come back: London says EU nationals with settled status in the UK risk losing it if they leave Britain for more than two years. The EU seems to agree with this position with regards to UK citizens in the EU-27 nations.
UK position: All EU nationals lawfully resident in the UK for at least five years will be able to apply for "settled status", and be able to bring over spouses and children.
Settled status should allow them to be treated like British citizens in regard to residency, entitling them to education, healthcare, benefits and pensions - family reunion is not included, however.
People who have gained permanent UK residency status will have to apply again. In addition, EU nationals will have to hold an identity document, attesting to their "settled status".
Those who have been legally resident in the UK for fewer than five years at the time of Brexit will have to apply for temporary status in order to stay. UK courts will resolve any dispute on who is qualified to seek a "settled status".
The EU position: An unconditional lifetime guarantee under EU law for the rights currently enjoyed by those who are in the UK and their family members.
This would mean continued rights to residency, work, establishing a business, access to healthcare, social security and pensions.
There is also a dispute as to when people must be in the UK to qualify for the settled status.
UK position: Between 29 March 2017 (when the Article 50 exit procedure was triggered) and two years later on Brexit day.
All EU nationals in the UK before that date will be able to build up five years' worth of residency time, which is necessary for applying for "settled status".
Those who arrive after the cut-off date may stay for a "temporary period", but will not be guaranteed "settled status".
The EU position sees the cut-off date as the date of Brexit - 29 March 2017.
ECJ and guaranteeing rights
The UK position: The rights enshrined in UK law will be enforceable in the British legal system.
UK courts will provide legal guarantees for these EU citizens, and the government is ready to put commitments on this in the divorce agreement with the EU.
The final divorce agreement will have legal standing in international law.
The European Court of Justice (ECJ) will not have jurisdiction in the UK, but London has shown a willingness to discuss setting up a new arbitration body.
The EU position: The European Commission should be able to monitor the rights, and the ECJ should have full jurisdiction for an indefinite duration to protect these rights.
Download the dataset.