Image caption Windrush scandal: Facing the threat of deportation

Jeremy Corbyn has called for an end to the government's so-called "hostile environment" immigration policy, saying it has "ripped apart" people's lives.

The Labour leader said the Windrush generation and their families had been treated as "second-class citizens".

The opposition has repeated its call for Home Secretary Amber Rudd to quit.

Justice Secretary David Gauke said there had been major "implementation failures" but the core policy of trying to deter illegal migration was right.

Theresa May has apologised on several occasions for the distress caused to the relatives of Caribbean migrants who settled in the UK between 1948 and 1971 - some of whom have been threatened with deportation, have lost their jobs or been refused access to medical treatment arising from changes to immigration rules since 2014.

She has promised compensation to those whose right to live in the UK was questioned and who suffered hardship because they did not have proof of residency or their documentation was rejected by immigration officials.

The BBC's political correspondent Eleanor Garnier said the Home Office is expected to set out more details about compensation this week. If that doesn't come quickly enough or if there isn't significant progress in helping people affected, she added, then the pressure on the home secretary and prime minister will increase.

'Something rotten'

Speaking at the Welsh Labour conference in Llandudno, Mr Corbyn said Mrs May was personally responsible as she had set "a deliberately unreachable bar" in her previous role as home secretary by forcing migrants to provide proof of residence to access services such as housing and healthcare.

"This week something rotten at the heart of government has come to the surface," he said.

Image caption Explained: What is the 'hostile environment' policy?

"We have seen one government minister after another, including the prime minister, try and dodge and weave around the facts to avoid scrutiny and entirely justified criticism.

"It is not that they weren't warned. At the time the Tories were pushing their hostile immigration policy through Parliament, some of us warned of the consequences this could have for many people and families.

"People's lives ripped apart because of the personal decisions and actions of Theresa May and her government."

He called for a stop to "disgraceful" and "discriminatory" policies which have resulted in people being "shut out of public life".

'Failure of implementation'

In an interview with the BBC's Andrew Marr show - presented this week by Nick Robinson - shadow foreign secretary Emily Thornberry conceded the phrase "hostile environment" in relation to illegal immigration had first been used under the last Labour government.

But she insisted it had been cranked up by the Conservatives to a point where "people have died, people have lost their jobs, lost their futures".

Her colleague Dawn Butler went further, telling Sky News she thought the PM had "presided over racist legislation that has discriminated against a whole generation of people from the Commonwealth".

However, Labour MP Owen Smith told ITV's Peston on Sunday his party should have done more to oppose a tightening of the rules in the 2014 Immigration Act which had had "terrible unintended consequences" for people.

Image caption Poet Benjamin Zephaniah wants the government to act "immediately" over Windrush

The party - then led by Ed Miliband - abstained in crucial votes, although Mr Corbyn and a handful of allies now on Labour's frontbench, such as John McDonnell and Diane Abbott, voted against it.

Defending the government, Mr Gauke said British citizens whose right to live in the UK had been questioned and who had suffered huge anxiety should get financial redress.

Although there had been "very significant failures in terms of how it was implemented", he said the government would not be backing down on its core policy of bearing down on illegal immigration and, "in these circumstances", it would not be right for ministers to quit.

"Where there are failures of policy, then we are held accountable for that," he told the Andrew Marr show.

"When it comes down to it, the central policy is right," he added.

"When it comes to those who are illegal, those who should not be here, if we want a sustainable immigration system that has public support, it's right that we address this."

But Conservative former Communities Secretary Baroness Warsi said ministers should "think long and hard about the trauma" caused to families by their immigration policies - calling again on the government to drop its "unrealistic" target of reducing annual net migration to below 100,000 a year.