LONDON -- British Prime Minister Theresa May on Monday appointed the first ethnic-minority politician to the key post of home secretary, as the government struggled to contain a scandal over the mistreatment of long-term residents from the Caribbean. Lawmaker Sajid Javid replaced Amber Rudd, who resigned late Sunday, saying she had "inadvertently" misled lawmakers about whether the government had deportation targets.

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

The furor began when the Guardian newspaper reported that some people from the Caribbean who have lived in Britain for decades had been refused medical care or threatened with deportation because they could not produce paperwork proving their right to reside in the country.

Get Breaking News Delivered to Your Inbox

Outrage at their treatment has piled pressure on May, who was home secretary between 2010 and 2016 and introduced tough immigration policies intended to make Britain a "hostile environment" for unauthorized migrants.

Javid on Monday said his most urgent task was "to help those British citizens that came from the Caribbean, the so-called Windrush generation, and make sure that they are treated with the decency and the fairness that they deserve."

Javid, the son of Pakistani immigrants, is the first politician from an ethnic minority to hold one of the four top jobs in Britain's government - prime minister, finance minister, foreign secretary and home secretary.

Immigration is a divisive issue in Britain, and reducing the number of newcomers was a major factor for many voters who in 2016 backed leaving the European Union. The Conservative government has an oft-stated but long-unmet goal of reducing net immigration below 100,000 people a year, less than half the current level.

The Empire Windrush arrives at Tilbury, United Kingdom, June 22, 1948, transporting the first large group of immigrants from Jamaica to Britain. 492 passengers from Jamaica arrived to start a new life, initiating an era of immigration and multiculturalism in Great Britain. The ship's arrival became a landmark in British cultural and political history. REUTERS

The current furor involves members of the "Windrush generation," named for the ship Empire Windrush, which in 1948 brought hundreds of Caribbean immigrants to a Britain 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 now been denied housing, jobs or medical treatment because of requirements that employers and doctors check people's immigration status. Others have been told by the government that they are in Britain illegally and must leave.

"That could be me," Javid told the Sunday Telegraph.

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

But 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."

Britain's Home Secretary Amber Rudd leaves after an emergency cabinet meeting at Downing Street in an April 12, 2018 file photo in London, England. Getty

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.

In a resignation letter to the prime minister, Rudd said she had "inadvertently" misled lawmakers. May said she accepted that Rudd had spoken "in good faith" and was sorry to see her resign.

The Windrush scandal is also causing anxiety for the 3 million European Union citizens living in Britain who are concerned about their immigration status after the country leaves the EU next March. The British government says they will be allowed to stay.

May's office said Javid's former job, communities secretary, would be filled by James Brokenshire, a former secretary of state for Northern Ireland.