(CNN) British Prime Minister Theresa May has moved swiftly to shore up her government in the wake of the sudden resignation of a senior minister over an immigration scandal late on Sunday night.

May appointed Sajid Javid, a second-generation migrant whose parents came to Britain from Pakistan, as Home Secretary on Monday morning, plugging a hole left when predecessor Amber Rudd fell victim to a growing controversy over the treatment of the so-called Windrush generation of immigrants.

Javid, 48, is the first member of an ethnic minority to hold the position, one of the most senior in the British government. He had spoken out forcefully on the plight of people from former British colonies who arrived legally in Britain in the 1950s and 60s, but who had struggled to prove their status amid a wider crackdown on illegal immigration. They became known as the Windrush generation after the name of the ship that brought an early group of Caribbean migrants to Britain in 1948.

It is a significant promotion for Javid, who was previously the Secretary of State for Communities, Local Government and Housing. He voted Remain in the 2016 referendum on British membership of the European Union, and his appointment -- announced by Prime Minister Theresa May in a tweet Monday morning -- maintains the delicate and often uneasy balance between "remainers" and "Brexiters" in the government.

Former Home Secretary Rudd quit the top Cabinet post after admitting she "inadvertently misled" government over targets for the deportation of illegal immigrants.

Rudd had claimed to a parliamentary committee that her department did not impose targets, but the Guardian reported on Sunday that in a private letter to May in 2017, she had informed the Prime Minister that she intended to boost deportations by 10%.

Her position on deportations came against the backdrop of her departments' handling of the "Windrush generation," men and women from the Caribbean who arrived legally in Britain in the 1950s and 60s, but who have struggled to prove their status amid the crackdown on illegal immigration.

Rudd was the fourth high-ranking minister to resign from Prime Minister May's Conservative government in the past six months.

Britain's new Home Secretary Sajid Javid.

Former Home Secretary Amber Rudd and key ally Prime Minister Theresa May.

Shortly after the appointment, Javid told the BBC his "most urgent task" was making sure the Windrush generation was "treated with the decency and the fairness that they deserve."

He said his parents, who migrated from Pakistan to the UK, would be incredibly proud of his appointment, before adding: "But I haven't called my mum yet."

Javid previously voiced his concern over the Windrush scandal in an interview with British newspaper The Sunday Telegraph at the weekend, saying one of his first thoughts was, "It could have been me."

"I'm a second-generation migrant. My parents came to this country from Pakistan, just like the Windrush generation," he said, adding that his father worked in a cotton mill and as a bus driver.

"When I heard about the Windrush issue I thought, 'That could be my mum ... it could be my dad ... it could be my uncle ... it could be me.'"

Javid's appointment comes at a delicate time for the embattled Prime Minister, struggling on multiple fronts negotiating Britain's exit from the EU.

Writing in the Telegraph in 2016 , Javid said he was a "Eurosceptic and proud of it." But at the same time, ultimately believed "that Britain is better off in (the EU)."

Before entering politics, Javid was managing director at Deutsche Bank , and has previously said staying in the European single market -- the tariff-free common trading area -- was a big factor in his decision to vote remain. He was Business Secretary in the previous government of David Cameron.

What is the Windrush scandal?

The Windrush generation came to Britain to help in the postwar rebuilding efforts, following the devastating effects of World War II.

They came to symbolize the seismic demographic changes that took place in post-war Britain, when hundreds of thousands of people came to the United Kingdom from former British colonies, known as the Commonwealth.

JUST WATCHED Caribbean immigrants in UK face deportation Replay More Videos ... MUST WATCH Caribbean immigrants in UK face deportation 02:27

But in recent years, successive British governments have sought to appear tough on illegal immigration, and their descendants are now struggling to prove a citizenship status they previously took for granted.

May's government recently said the Home Office destroyed landing documents for members of the Windrush generation and their children, compounding the difficulties they faced in proving their right to be in the UK. Some lost their jobs, others faced difficulty accessing welfare benefits and a few were threatened with deportation.

May apologized to Caribbean leaders for any "anxiety" caused by the records destruction, which occurred when she was Home Secretary under the previous administration.

May serve as Home Secretary from 2010 to 2016 under then-Prime Minister David Cameron. Policies from that time included sending out vans to tell illegal immigrants to "go home," making regular deportations and resistance to rescue operations that pulled drowning migrants from the Mediterranean.

Rudd's departure deals a further blow to the embattled Prime Minister's leadership, after a misjudged election last year aimed at "strengthening her hand" in Brexit negotiations backfired spectacularly when her Conservative party lost its parliamentary majority.