Almost 300,000 EU citizens living in Scotland have applied for settled status, according to official statistics.
Figures published by the UK Government showed that a total of 291,000 people applied to the EU Settlement Scheme.
The deadline for the scheme passed on Wednesday, having been launched back in March 2019.
In total across the UK, over six million applications were made to the scheme, with 5.1 million granted settled status.
As many as 400,000 applications were made last month ahead of the deadline for the scheme, with around 570,00 currently pending.
The UK Government has said that those who applied before the deadline will have their rights protected until their application is decided, as set out in law, and have the means to prove their protected rights if needed.
EU citizens had been asked to apply for the Home Office scheme so that they are able to continue living and working within the UK.
For those who did not apply, immigration enforcement officers will have powers to issue a 28-day notice to anyone they discover who may be eligible for the scheme but cannot prove their immigration status.
UK home secretary Priti Patel said: “When we left the EU we promised to protect the rights of EU citizens who have made their life in the UK, and developed the hugely successful EU Settlement Scheme to ensure they could call the UK home in the years to come.
“Having more than six million applications to the scheme is an unprecedented achievement and I am delighted that we have secured the rights of so many EU citizens – our friends, neighbours and family members.”
Scotland Office minister Iain Stewart said that people who missed the deadline will still be able to apply if they have a “reasonable excuse” for missing it.
“It’s great news that more than 291,000 EU citizens living in Scotland have applied for settled status, meaning they can continue to live and work here,” he said.
“They are our friends and neighbours, contribute a huge amount to our communities, and will continue to be very welcome.
“We made it as simple as possible for people to apply, including funding organisations across the UK to support people with their applications.”
He added: “We know some may have slipped through the net, so EU citizens will still be able to apply if they have a reasonable excuse for missing the deadline.
“If Home Office encounter someone eligible who doesn’t have EU settlement status, they’ll be given an opportunity to apply within 28 days.”