Issuing identity cards would help avert a larger Windrush-style scandal post-Brexit, ministers have been told.
Leading academic Baroness O'Neill of Bengarve argued of the need for "robust identification documents", demonstrating a person's entitlements during a debate in the House of Lords.
The independent crossbencher said the inability to produce documentary evidence contributed to the "sorry story" of the Windrush generation - named after a ship that brought migrants to Britain from the Caribbean in 1948 - whose treatment has led to an angry backlash against the Government.
Commonwealth citizens who arrived before 1973 were automatically granted indefinite leave to remain under the 1971 Immigration Act.
But some of those who arrived in the years after the Second World War have been challenged over their status.
It led to cases of long-time UK residents being denied healthcare, unable to work or even possibly being wrongly deported.
Lady O'Neill, who was chairman of the Equality and Human Rights Commission, told fellow peers: "I think the best protection against being misclassified as an illegal immigrant...is surely to be able to demonstrate that one is a citizen or that one is a non-citizen with specific rights such as right to travel, to live or to work in the UK.
"Ability to demonstrate entitlement I think is crucial.
"We have seen some of the consequences of inability to demonstrate entitlement in the sorry story of the Windrush events."
The Windrush debacle has been blamed on the "hostile environment" policies first introduced by Theresa May while she was at the Home Office.
Lady O'Neill added: "So we are all now aware that a policy that aimed to create a really hostile environment for illegal immigrants in fact led to the mistreatment of persons who were not illegal immigrants but were entitled to live and work in the UK.
"That was a shameful failure at many levels."
She went on: "Immigration restrictions form a proper part of a rules based international order and do not require the creation of hostile environments.
"Indeed their enforcement is likely to be damaged by the fantasy of creating hostile environments.
"But if rules are to be enforced it has to be feasible for people to be able to obtain the documents they need in order to demonstrate their entitlements."
Lady O'Neill said: "We have tried in this country to do without ID cards which some see as intrusions into privacy. I find this attitude dated and quaint.
"Many of those who object to ID cards nevertheless go around with mobile phones, that systematically disseminate far more information about them, their location, their contact, their payments, which ID cards do not provide."
Pressing the Government over the provision of "robust identification documents", she added: "None of us wants a new and probably much larger version of the Windrush scandal as a result of Brexit."
The debate had been opened by Labour peer Lord Bassam of Brighton, who was scathing of the Government's "hostile environment" approach, which the recently appointed Home Secretary Sajid Javid has distanced himself from.
Lord Bassam said: "He knows the policy is a stain on our country's international reputation for fairness and goes to the heart of the reputation we once had for providing a safe haven and a home to the dispossessed."
He added: "That the hostile environment policies since 2012 have seeped into the fabric, operation and culture of many of our public institutions shames us all.
"It is right that these policies are now being scrapped as their appalling implications have been realised."
Going forward, Lord Bassam urged the Government to promote fairness in the system "without playing at dog-whistle politics or trying to appease the politics of social division and racism".
Former trade union leader and Labour peer Lord Morris of Handsworth said having come to the UK from Jamaica in 1954, aged 16, he was a member of the Windrush generation.
He said: "The problems began when a new immigration Act was passed in 2012 which required people to have documentation to prove they were here legally in order to work, rent a property or access benefits, including healthcare.
"Without paperwork, many British citizens who had been here since childhood found themselves homeless, jobless and without access to funds, including pensions. They slept on couches, in huts and on the streets, and begged and borrowed. Some were deported."
He added: "The 2013 promise of a 'hostile environment'...may have been for illegal immigrants but it was soon to be for everyone, including legal immigrants."
Liberal Democrat peer Lord Taverne argued the Home Office was treating some migrants as "terrorists" for making mistakes in their tax returns.
He said: "This treatment is a national scandal. A monstrous injustice is being perpetrated by our government in our name."
Liberal Democrat Lord Jones of Cheltenham said there had been a tendency in recent years to "kow tow to the racist nonsense spouted by some very unpleasant people here and abroad," adding: "We should reject that approach."
Independent crossbencher Baroness Flather, a former member of the Commission for Racial Equality, said the Home Office was not functioning properly and needed to be more efficient in tackling illegal immigration.
For the Liberal Democrats, Baroness Hamwee warned: "There is a danger that hostility as a policy is reflected across the community with ethnicity a proxy for racism."
Opposition spokesman Lord Kennedy of Southwark said: "The scandalous treatment of the Windrush generation citizens...shames our country and has done huge reputational damage and hurts people who have every right to be here in the United Kingdom."
Responding, Home Office Minister Baroness Williams said: "As well as having a fair and humane immigration system, we need one which actually clearly distinguishes between those who are here legally and those who are here illegally.
"It is important to recall that successive governments have put in place controls to deter illegal migration and protect public services."
Lady Williams also pointed out it was the previous Labour government which had coined the term "hostile environment" in relation to illegal immigration.
On the concerns raised by Lady O'Neill, the minister said a clear process was being put in place "so that what happened with Windrush is not in future years seen to happen to EU citizens", applying for settled status.
"The application system will be simplified, it will be user-friendly and it will draw on existing government data to minimise the burden on applicants."
Copyright (c) Press Association Ltd. 2018, All Rights Reserved. Picture (c) Steve Parsons / PA Wire.