A committee of MPs has demanded "root and branch reform" of the Home Office's culture, policies and approach to immigration following the Windrush scandal.
A report by the House of Commons Home Affairs Select Committee (HASC) questioned whether the "hostile environment" approach promoted by Theresa May as home secretary should be allowed to continue in its current form.
It blamed the "appalling" treatment of long-standing UK residents of Caribbean heritage on political decisions which created an environment in which they were treated with suspicion and scepticism.
And it warned that, unless lessons are learnt, the Home Office may repeat the same mistakes with the three million EU nationals resident in the UK who are being required to take on a new migrant status following Brexit.
Some 8,000 people who arrived in the UK as long ago as the 1950s have now contacted the Windrush task force set up by the Home Office, with more than 2,000 receiving documents confirming their right to stay in Britain.
But the committee said it was "unacceptable" that the Government was still unable to say how many people were unlawfully detained, ordered to report to Home Office centres, lost their jobs or were denied access to healthcare or other services.
Processes were put in place which appeared designed to set people up to fail, independent checks and balances were removed and there were repeated failures in oversight mechanisms at senior levels of the Home Office, said the cross-party committee.
Enforcement targets for immigration officers may have led removal teams to focus on people like the Windrush generation because they were "easier to detain and remove".
The report called for an immediate re-evaluation of the "hostile environment", which tries to deter illegal migrants by requiring people to prove their right to be in the UK in order to access work, healthcare and housing.
Other recommendations included an overhaul of the casework culture at UK Visas and Immigration, the restoration of immigration appeals and legal aid and the ditching of the Government's flagship goal to cut net migration below 100,000 a year.
Ministers have promised to compensate members of the Windrush generation.
But Home Secretary Sajid Javid rejected a HASC call for a hardship fund to tide them over until payments arrive, telling committee chair Yvette Cooper in a letter that "making interim compensation payments now would undermine that process".
Ms Cooper described the move as "very troubling", insisting that "those who have been badly wronged by the British Government should not have to struggle with debts while they are waiting for the compensation scheme being up and running".
The committee said that the compensation scheme should reflect emotional distress as well as financial harm and must be open to the children and grandchildren of the Windrush migrants.
It demanded the immediate publication of a review of advice given to ministers drawn up by Mrs May's standards adviser Sir Alex Allan.
And it called for assurances that the Williams Inquiry into the Home Office handling of the affair, commissioned by Mr Javid, would be independent and would publish its findings in full.
"Members of the Windrush generation have been denied their rights and treated appallingly by the Home Office and there is still a very long way to go to put this right or to ensure it won't happen again," said Ms Cooper.
"Policy choices and political decisions in the Home Office led to a hostile culture and callous system so alarm bells didn't even ring in the department about locking up a grandmother who has lived here for decades, or when long-standing lawful residents lost their NHS treatment and were met with a wall of bureaucracy in response.
"Oversight in the Home Office that should have caught these problems completely failed."
Ms Cooper was critical of "inaccurate" information regarding removal targets provided to the committee by the Home Office, which eventually forced the resignation of Amber Rudd as home secretary in April.
She added: "The new Home Secretary has a great deal of work to do before the UK has a humane and fair immigration system.
"The Windrush generation, who have contributed so much to Britain, have been badly let down.
"The Home Office has a responsibility to make sure nothing like this can ever happen again.
"In the words of Paulette Wilson, wrongly detained and threatened with deportation, 'You cannot keep treating people like this'."
A Home Office spokesman said: "The experiences faced by some members of the Windrush generation are inexcusable and it is clear that we must do what is needed to ensure that nothing like this happens again.
"The Home Secretary has said that it is his top priority to right the wrongs that have occurred.
"A lessons learned review, which will have independent oversight, will help ensure that we have a clear picture of what went wrong and how we should take this forward."