LONDON — Britain’s interior minister resigned Sunday amid a scandal over authorities’ mistreatment of long-term U.K. residents wrongly caught up in a government drive to reduce illegal immigration.

Prime Minister Theresa May’s office said late Sunday that May had accepted the resignation of Home Secretary Amber Rudd.

The scandal has dominated headlines in Britain for days and has sparked intense criticism of the Conservative government’s tough immigration policies.

Rudd had been due to make a statement to Parliament on Monday over what has become known as the Windrush scandal.

The furor has grown since The Guardian newspaper reported that some people who came to the U.K. from the Caribbean in the decades after World War II had recently been refused medical care in Britain or threatened with deportation because they could not produce paperwork proving their right to reside in the country.

Those affected belong to the “Windrush generation,” named for the ship Empire Windrush, which in 1948 brought hundreds of Caribbean immigrants to Britain, which was seeking nurses, railway workers and others to help it rebuild after the devastation of World War II.

They and subsequent Caribbean migrants came from British colonies or ex-colonies and had an automatic right to settle in the U.K. But some have been ensnared by tough new rules introduced since 2012 that are designed to make Britain a “hostile environment” for illegal immigrants.

Legal migrants have been denied housing, jobs or medical treatment in Britain because of requirements that landlords, employers and doctors check people’s immigration status. Others have been told by the government that they are in Britain illegally and must leave.

“What has happened to the Windrush generation isn’t an anomaly. It’s not due to an administrative error. It’s a consequence of the hostile environment created by this (Conservative) government,” London Mayor Sadiq Khan, a member of the opposition Labour Party, said Sunday.

In recent weeks Rudd and May have apologized repeatedly to the Windrush generation, saying all pre-1973 Commonwealth immigrants who don’t already have British citizenship will get it, and those affected will get compensation.

Rudd’s position worsened after she told lawmakers last week that the government did not have targets for deporting people – only for a 2017 memo to emerge that mentioned specific targets for “enforced removals.”

Rudd said she didn’t see the memo, but The Guardian later published a leaked letter she wrote to the prime minister discussing an aim of increasing removals by 10 percent.