The Home Office showed “ignorance and thoughtlessness” on the issue of race, a review of the Windrush scandal says.
The long-awaited review comes after some of those who came to the UK from Commonwealth countries were wrongly told they were in Britain illegally.
There was a “profound institutional failure” which turned thousands of people’s lives upside down, it said.
Warnings about the “hostile environment” policy were “not heeded”, the review concludes.
Report writer Wendy Williams, an inspector of constabulary, called on the government to provide an “unqualified apology” to those affected and the wider black African-Caribbean community.
Speaking in the House of Commons Home Secretary Priti Patel said there was "nothing I can say to undo the pain" but added "on behalf of this and successive governments I am truly sorry for the actions that span decades".
Ms Patel said people from the Windrush generation were subject to "insensitive treatment by the very country they called home".
"I am sorry that people's trust has been betrayed."
She added that those who were eligible would receive compensation.
Shadow home secretary Diane Abbott told the home secretary that: "People will believe her apology when they see her genuinely seek to implement the recommendations in the review."
Ms Abbott, whose mother was a member of the Windrush generation, said for those affected "it isn't necessarily the money, the inconvenience or the tragedy of being deported, it is the insult to people who always believed they were British."
Theresa May, who was prime minister when the scandal came to light, added her own apology to the home secretary's. "They [the Windrush generation] should not have been treated in this way," she said.
The 275-page report says the “root cause“ of the scandal can be traced back to legislation of the 1960s, 70s and 80s, some of which had “racial motivations”.
“Race clearly played a part in what occurred”, said Ms Williams, adding that some failings could be indicators of “indirect discrimination”.
“The factors that I identified demonstrate an institutional ignorance and thoughtlessness towards the issue of race and the history of the Windrush generation.
“These aspects were among those included in the elements of the definition of institutional racism considered in the Macpherson inquiry [which looked into the murder of Stephen Lawrence].
“Operational and organisational failings” at the Home Office had a “causative impact” on the “detrimental” way Windrush migrants were treated.
They were “caught up in measures designed for people who have no right to be in the UK”.
She also found:
- The Home Office was fragmented and decision-making was "siloed"
- A target-dominated work environment within visas and immigration enforcement sections
- A lack of empathy in some cases along with dehumanising jargon and cliches
- Some senior civil servants and former ministers showed ignorance, lack of understanding and acceptance of the full extent of the injustice
- Changes to legal aid contributed to the scandal
- A history of prejudice towards black people and wider society also a factor
Ms Williams says she spoke to former Home Secretaries Amber Rudd - who resigned over the affair in 2018 - Theresa May, Alan Johnson and Jacqui Smith.
Commenting on speculation that the document has been watered down, with a finding that the Home Office is institutionally racist removed, she said:
“If anyone thinks I’ve pulled my punches I’d be very surprised indeed.”
Among 30 recommendations, the review says the Home Office should set up a full review of the hostile environment policy, appoint a Migrants Commissioner, develop a programme of cultural change for the department and establish a race advisory board.
David Isaac, chair of the Equality and Human Rights Commission, said the Windrush scandal had exposed "deep flaws" in the UK's immigration system.
He added: "This independent review underlines many of our serious and long-standing concerns about the impact of the government's hostile environment policies on some groups. These are highly significant findings and we will be using our legal powers so this does not happen again."
by Adina Campbell, BBC community affairs correspondent
Today’s review is a damning indictment of Home Office immigration policy which goes as far back as the 1960s, with race being a significant factor.
This comprehensive report attempts to draw a line under the government’s woeful action but many Caribbean migrants have lost faith and fear the UK immigration system.
They’ve been put through years and in some cases decades of misery.
Broken families, shattered careers and being denied NHS healthcare won’t be forgotten anytime soon.
Meanwhile those who were wrongly deported or detained say the way they’ve been mistreated is unforgivable.
The government’s compensation scheme has also been heavily criticised with victims claiming it’s taking too long to access the financial support they’ve been promised.
Many of these communities have lost complete trust in the government and the chances of restoring it are slim.
An estimated 500,000 people now living in the UK who arrived between 1948 and 1971 from Caribbean countries have been called the Windrush generation, a reference to a ship which brought workers to the UK in 1948.
They were granted indefinite leave to remain in 1971 but thousands were children travelling on their parents' passports, without their own documents.
Changes to immigration law in 2012 meant those without documents were asked for evidence to continue working, access services or even to remain in the UK.
Some were held in detention or removed despite living in the country for decades, resulting in a furious backlash over their treatment.
The scandal prompted criticism of "hostile environment" measures introduced to tackle illegal immigration.