LONDON (AP) — British Prime Minister Rishi Sunak said Thursday he would “do what is necessary” to revive a blocked deal to send asylum-seekers to Rwanda, even if it means ignoring U.K. human rights laws.

During a hastily scheduled news conference, Sunak vowed to press on with a plan that has roiled the governing Conservative Party and threatened his leadership.

He said that a new bill designed to override a U.K. Supreme Court ruling will end “the merry-go-round of legal challenges” that have prevented the government acting on its agreement with Rwanda to put migrants who reach Britain across the English Channel on a one-way trip to the East African country.

“We will get flights off the ground,” Sunak said.

Many European countries and the U.S. are struggling with how best to cope with migrants seeking refuge from war, violence, oppression and a warming planet that has brought devastating drought and floods.

Britain’s Rwanda plan is one of the more novel responses, though critics say it’s both unethical and unworkable to send migrants — many of them fleeing conflict-scarred countries such as Afghanistan, Syria and Iraq — to a nation 6,400 kilometers (4,000 miles) away with no chance of ever settling in the U.K.

But Sunak’s main political threat comes from members of his party who think his plan is not harsh enough. The prime minister’s authority was challenged when Immigration Minister Robert Jenrick quit the government late Wednesday, saying the government’s bill “does not go far enough” and won’t work.

The Rwanda plan is central to the U.K. government’s self-imposed goal to keep unauthorized asylum-seekers trying to reach England from France in small boats. More than 29,000 people have done that this year, and 46,000 in 2022.

Britain and Rwanda agreed on a deal in April 2022 under which migrants who cross the Channel would be sent to Rwanda, where their asylum claims would be processed and, if successful, they would stay. Rwanda, which is already home to thousands of refugees from African countries, agreed to the deal after Britain paid it 140 million pounds ($175 million) upfront.

The U.K. government argues the deportations will discourage others from making the risky sea crossing and break the business model of people-smuggling gangs.

No one has yet been sent to Rwanda under the plan, which has faced multiple legal challenges. Last month, the U.K. Supreme Court ruled the plan was illegal because Rwanda isn’t a safe country for refugees, whom judges said face “a real risk of ill-treatment.”

The U.K. government has refused to drop the plan. This week Britain and Rwanda signed a treaty pledging to strengthen protections for migrants. Sunak’s government says the treaty allows it to pass a law declaring Rwanda a safe destination.

The government says the law will allow it to “disapply” sections of U.K. human rights law when it comes to Rwanda-related asylum claims and make it harder to challenge the deportations in court.

Sunak said the bill “blocks every single reason that has ever been used to prevent flights to Rwanda taking off.”

Mike German, a Liberal Democrat legislator in the House of Lords, said the government was embarking on “a dangerous slippery slope” by stripping asylum-seekers of their human rights.

“Which group of people out of favor with the government will be next?” he said.

The bill has its first vote scheduled in the House of Commons on Tuesday. It may face opposition from centrist Conservative lawmakers who oppose Britain breaching its human rights obligations. But the bigger danger for Sunak comes from the hard-line right wing who think the bill is too mild and want the U.K. to leave the European Convention on Human Rights. Almost every European country, apart from Russia and Belarus, is bound by the convention and its court.

Sunak said the bill went as far as the government could.

“If we were to oust the courts entirely, we would collapse the entire scheme,” he wrote in a letter to Jenrick.

Rwandan Foreign Minister Vincent Biruta confirmed that his country would scrap the deal unless Britain stuck to international law.

“It has always been important to both Rwanda and the U.K. that our rule of law partnership meets the highest standards of international law, and it places obligations on both the U.K. and Rwanda to act lawfully,” he said in a statement.

Sunak has made “stopping the boats” one of his key pledges ahead of a national election that is due next year. He hopes that showing progress will help his Conservatives close a big polling gap with the opposition Labour Party.

Rivals are circling in case he fails. Former Home Secretary Suella Braverman. a leading right-winger whom Sunak fired last month, is seen as likely to run for party leader if the Conservatives lose power in an election.

The party leadership contest could come even sooner if Conservative lawmakers think ditching Sunak will improve their chances. Under party rules, Sunak will face a no-confidence vote if 53 lawmakers — 15% of the Conservative total — call for one.

Braverman criticized the Rwanda bill and said the law must go farther, including a ban on legal challenges to deportation and incarceration of asylum-seekers in military-style barracks.

“We have to totally exclude international law -– the Refugee Convention, other broader avenues of legal challenge,” she said.

Braverman did not answer directly when asked if she supported Sunak as prime minister.

“I want the prime minister to succeed in stopping the boats,” she said.