The government has suffered a series of defeats in the House of Lords over its borders bill including plans to treat asylum seekers differently depending on how they arrive in the UK.
The government says it wants to stop people using illegal routes.
But one Labour peer, who fled Nazi Germany as a child, said the proposal was “nonsense” and “unworkable”.
Peers also voted down powers allowing the government to strip British people of their citizenship without warning.
The defeats came during a debate of the government’s Nationality and Borders Bill – the legislation implementing a post-Brexit asylum system.
The government has said it would create a “firm but fair” process allowing the UK to “take full control of its borders”.
However, some of its provisions have attracted criticism and protests.
In the House of Lords on Tuesday evening, peers attacked one of the bill’s provisions which would make it a criminal offence to knowingly arrive in the UK without permission.
Those coming via official routes – such as the Syrian resettlement scheme – would be fast-tracked into a new life in the UK.
Meanwhile, people relying on other routes, including using people smugglers, to get to the UK could struggle to get permanent residence, or be sent back to safe countries they have passed through along the way.
It comes as Home Secretary Priti Patel is facing pressure to reduce the numbers trying to get to the UK by crossing the channel on boats.
Home Office minister Baroness Williams of Trafford argued the provision struck “a robust balance between firmness and fairness”.
However Labour’s Lord Dubs – who escaped Nazi Germany as a child – said people often struggled to get to the UK by the official routes.
“It’s a complete nonsense, it’s not workable and it diminishes this country in the eyes of the world,” he said.
Lord Kerr – a former senior civil servant at the Foreign Office – said if passed, the law would prevent Ukrainians escaping conflict from getting to the UK.
He also expressed concern that other countries would follow the UK’s example, leading to a situation where “anyone seeking to flee persecution would find the gates of freedom clanging shut in their face”.
In a vote, peers backed his proposal to remove the relevant clause from the bill by 204 votes to 126, a majority of 78.
The House of Lords inflicted another defeat on the government when it voted against powers allowing the government to strip people of their British citizenship without warning.
Under international law everyone has the right to a nationality so people cannot “arbitrarily” be left stateless.
But the British government says it is possible to strip people of their citizenship if they have another nationality to fall back on – for example if they have dual citizenship.
The Home Secretary is allowed to use the power in certain cases for example if it is “for the public good”.
In February 2019, Shamima Begum – who travelled to Syria to join the Islamic State when she was 15 – had her citizenship revoked.
Conservative Baroness Warsi, who was the first Muslim woman to serve in the Cabinet, said the government’s new proposal would make her and her children “second class citizens”.
“What this law does is that in the United Kingdom, in our courts, we punish two people convicted of the same crime differently based upon their heritage.
“We may not have taken this moment to put right the wrongs of the past but the least we can do is to stop a bad law becoming worse.”
Liberal Democrat peer and former senior police commander Lord Paddick argued that people who had committed crimes such as terrorist acts, should stand trial in the UK rather than being made “some other country’s problem”.
Baroness Williams said those who obeyed the law had nothing to fear, and that the law was aimed at those who paid a direct threat to “the safety and security of the UK”.
“It simply cannot be right that our hands are tied because we cannot take away their British citizenship without giving them notice of that decision.”
The government suffered two further defeats on the rights of exiled Chagos Islanders to get British citizenship and a change requiring the bill to comply with international protections for refugees.
Once the House of Lords has finished scrutinising the bill, it will return to the House of Commons where MPs will decide whether to accept or reject the changes.