Some members of the so-called Windrush generation, who arrived in the UK decades ago as children, have been incorrectly identified as illegal immigrants. Here are some of their stories.
Waiting for cancer treatment
The case of Albert Thompson - not his real name - has become the focus of much coverage during the current row.
The 63-year-old is not technically of the Windrush generation as he arrived in the UK from Jamaica in 1973 as a teenager.
But his case was brought to light after he was told he would have to pay £54,000 for prostate cancer treatment unless he could produce the right documentation.
"I was less than two weeks away from my treatment. That was really upsetting," he told the BBC.
"I get to the Royal Marsden and they gave me this form to fill out where they want to see passport or visa, benefits letter and bank statement.
"At the end of the day, I don't have those things to show so I've got to pay £54,000, which I haven't got."
Labour leader Jeremy Corbyn has raised Mr Thompson's struggles at Prime Minister's Questions, first in March and again on Wednesday, when he accused Theresa May of declining to help him.
The prime minister insisted the Home Office has been in contact with Mr Thompson's representatives, and said his NHS treatment should never have been withheld.
But Mr Thompson said he first heard that he would receive treatment on the TV news.
"It makes me feel a bit better but not really completely. When I get the treatment - then I'll be over the moon," he said.
A spokesperson for the Royal Marsden Hospital in London said it had been committed to resolving Mr Thompson's eligibility for further NHS treatment with his legal advisers.
They added that his cancer specialist has contacted Mr Thompson to assess him in clinic for his next stage of treatment.
In response, Jeremy Bloom, Mr Thompson's lawyer, said his client had been told radiotherapy treatment would only go ahead if he paid in advance or proved he had indefinite leave to remain. The Royal Marsden disputes this.
'I'm still going through hell'
Paulette Wilson came to Britain from Jamaica aged 10 in the late 1960s. Now 61, she said she was confused when she received a letter saying she was in the country illegally.
"I just didn't understand it and I kept it away from my daughter for about two weeks, walking around in a daze thinking 'why am I illegal?'"
Her daughter Natalie Barnes booked an appointment with the Home Office and was told her mother had six months to leave the country.
Ms Wilson then spent two years with the threat of deportation hanging over her, including a week at Yarl's Wood immigration removal centre, which she describes as "a nightmare".
Her MP and a local charity intervened to prevent her removal, and she has since been given a biometric residence permit which proves she can stay in the country.
"It's not ended because I've just got a card saying I have a right to stay in England - I still have to renew it in 2024," she said.
Ms Wilson welcomed the government's apology, but asked: "What about all the other people who were sent away before my case became big?
"It's just upsetting to think that an ordinary person like me could go through something like that. I'm still going through hell at the moment."
'I didn't exist'
Winston Walker arrived in the UK from Jamaica in 1966 aged 18 months, on his father's passport.
"I'm as British as anyone," said the 53-year-old, who grew up in Birmingham and now lives in Bristol.
He ran into difficulty in 2008 when applying for a provisional driving licence.
"I kept sending documents to the DVLA and they kept on sending it back," he told the BBC.
Mr Walker later contacted an MP to help, after which he said he was told he did not "exist on any data in this country".
"It was frightening. I've been schooled here - had the same National Insurance number since I was 16... To be told you don't exist, it's overwhelming."
Mr Walker was able to get a resident's permit but that does not make him a British citizen. He said he wanted a British passport, but found it "insulting" that it would cost him "about £1,500".
"My grandmother would be turning in her grave to find out the way her offspring had been treated," he added.
'I couldn't understand'
Junior Green arrived in the UK from Jamaica at 15 months old, in 1958.
"Sixty years, it's a long time. I'm an Englishman," he told BBC Newsnight.
In 2009, Mr Green tried to update his passport with the proper visa information, but was told by the Home Office he had to prove he had lived in the UK for each of the previous 10 years.
His application was rejected twice. In March last year, Mr Green travelled to Jamaica to be with his dying mother, but when he tried to return to the UK in June, he was not allowed on the flight.
"I was upset - virtually in tears. I couldn't understand why," he said.
Months passed and Mr Green's mother was repatriated to the UK, but her son was unable to return to attend her funeral.
He finally came back to the UK in September, after his local MP intervened.
'I just want a normal life again'
Nick Broderick, who came to the UK as a baby in 1962, has been fighting for the past four years to prove his legal status.
He was working for a recruitment company in Dunstable when his office was subject to an immigration check.
"I wrote to the Jamaican embassy, I sent £70 to get a birth certificate. That didn't happen 3 or 4 times... So they gave me these papers to fill out and after I filled it out, they said to me 'I'm sorry, we seem to have lost the papers that you sent in and so now you're going to be deported'," he told Radio 4's Today programme.
In the months that followed, Mr Broderick had to report to the police station every month, could not work or use his driving licence.
He said he knows others, in a similar position, who have been seriously ill with cancer and denied NHS treatment.
"It was an awful, awful time" which sent him "into a spiral of depression", he said.
"I always thought myself as being English. I just want to have a normal life again," Nick added.
'Nearly destroyed him'
Whitfield Francis was born in Jamaica in 1958 and came to England with his parents at the age of nine.
He only realised there was an issue over his right to remain in the UK when he tried to change jobs four years ago and was unable to provide proof of his status - something he didn't have - and he hasn't been able to work since.
The father-of-four says he can't afford to pay for a biometric residence permit or for legal assistance.
"No-one has given me any help," the 59-year-old said.
"If I haven't got these certain documents, my children could be affected. They may not be eligible for a British passport although they were born in Britain."
His former partner Helen Cappasso says the situation "nearly destroyed him" and being unable to provide for their four children has "broken his heart".
"I cannot express here what a nightmare it's been, and it's not over yet," she said.
Mr Francis, who is currently "sofa surfing" in Birmingham as he is unable to rent somewhere to live, said the government's pledge to help those affected has given him renewed hope that he would finally be able to work again.
'Sometimes I just want to give up'
Sonia Williams, who came to the UK from Barbados in 1975, aged 13, has been fighting to prove she is British for four years.
She was made redundant in 2014, and lost her driving licence in 2016.
"I can't drive, I can't work, I can't claims benefits, I can't do anything," she said. "Sometimes I just want to give up.
"My mum's got citizenship, my dad had right to remain. So I just presumed I had all that, because I was leaving Barbados to come and live with my family. I wasn't just coming on holiday."
She said she feels "stressed" and "numb", and doesn't accept the government's apology.
"I'm not working, I can't claim benefits, so where am I going to get this money to apply for these things that they're asking me for?"
The Home Office said it would get in touch with Ms Williams.
'Stripped of my identity'
The impact has not only been felt by the Windrush generation, but many of their children as well.
Katrice Louis, whose mother, now 59, came to England from St Lucia aged 8, was born and raised in London but is unable to get a British passport.
The 18-year-old says she only found out she wasn't classed as a British citizen when her mother tried to get passports for a family holiday in 2005.
Two of Katrice's older siblings, born in the 1980s, have British passports, but Katrice and two of her other sisters, born in the 1990s, are unable to get one.
"The only option we have been given is to spend thousands of pounds to apply for citizenship and a passport which we cannot afford," she said.
"I have never understood how I have been born and raised here, but still not classed as a British citizen and been stripped of my identity. I have been denied a job.
"I have been living in fear of being deported to a country I have never even seen."
'I cried my heart out'
Tanya Simms, from Sheffield, was born in the UK in 1990. Her grandparents came to the UK from Jamaica in the 1960s and settled in Reading, Berkshire.
They were granted British citizenship in the late 1960s and Tanya's mother joined them in the UK in 1975.
Last year Tanya applied for a passport so she could go on her friend's hen do but was turned down on the grounds that neither of her parents were settled at the time of her birth.
"I cried my heart out when I got the letter," she said.
"It hurts. I've put into the system, I've been educated here, paid national insurance here."
She fears for the future: "Where would they send me and my daughter? I've never been to Jamaica. What are they going to do? Just stick me in the sea?"