A study by think tank the Social Market Foundation assumed that Article 50 - the formal mechanism to leave the EU - is triggered next year and the process takes two years to complete.

It found that by 2019 more than 80% of the 3.6 million EU citizens currently living in the UK would meet the five-year requirement.

The paper said: " Given the likely protracted nature of Brexit, it is probable that all EU citizens arriving in the UK before 2014 and continuing to reside here will have permanent residency rights by the time Brexit actually occurs.

"Because the 'five years rule' is EU law it would be very difficult for the UK Government to rescind it before formally leaving the EU."

However, the think tank said as many as 590,000 people living in the UK may not have residency rights once the Brexit process has concluded.

Emran Mian, director of the Social Market Foundation, said: "There are 3.6 million EU residents currently living in the UK.

"Our analysis suggests that, while the majority have or will acquire permanent residence, the right to remain in the UK of almost 600,000 people may be at risk if the UK leaves the EU in 2019."

Britain is expected to seek to introduce controls on free movement rules following the vote to leave but details of the system are yet to be outlined.

Ministers have come under pressure to provide a firm guarantee about the status of EU citizens already in the country.

Mr Mian said: "The Government should now provide its own analysis and articulate a plan for starting discussions.

"Until it does, EU residents living in the UK, the businesses which employ them and the communities in which they live, are subject to uncertainty which will become more worrying as time goes on. "

Last week a Commons committee suggested that p ost-Brexit attempts to limit immigration and uncertainty during negotiations could spark a "surge" in arrivals.

MPs called on the Government to set out a cut-off date and end uncertainty for EU nationals who are already in the UK, warning they must not be used as "bargaining chips".

A Government spokesman said: "At present, the UK remains in the EU. This means that EEA, Swiss and UK nationals continue to have the same rights and status that they had before the referendum.

"The Government wants to be able to guarantee the legal status of EU nationals who are living in the UK, and we are confident that we will be able to do this. But we must also win the same rights for British nationals living in European countries."