Prime Minister Rishi Sunak has seen off a Tory rebellion over his flagship Rwanda bill but still faces a battle to get it through Parliament.
The Rwanda bill comfortably passed its first Commons hurdle with a majority of 44, but there will be further votes in the new year.
No Tory MPs voted against but some critics on the right of the party rebelled by abstaining.
Rebels said they had been told the PM would consider “tightening” the Rwanda bill.
But this could risk losing the support of more centrist Tory MPs, who have warned they would oppose any future changes which would breach international law.
The emergency legislation (Rwanda bill) was drawn up to revive the government’s plan to send some asylum seekers to Rwanda.
The government say the scheme is designed to deter migrants from crossing the Channel in small boats – something Mr Sunak has made one of his key priorities.
In a sign of nerves in Downing Street over the potential for a tight result, Climate Minister Graham Stuart flew back from the COP28 climate conference in Dubai to vote.
But despite some Tories on the right threatening to vote against the bill, in the end only opposition MPs did, and the bill passed by 313 votes to 269.
Some 37 Tory MPs – including former Immigration Minister Robert Jenrick, who resigned over the legislation last week, and former Home Secretary Suella Braverman – did not record a vote.
The majority of these come from factions who earlier said they could not support the bill and are likely to have deliberately abstained.
However, others may have been unable to attend to vote.
Shortly before the vote, five factions of backbench MPs – the European Research Group (ERG), the New Conservatives, the Common Sense Group, the Conservative Growth Group and Northern Research Group – announced they could not support the bill in its current form.
They plan to propose amendments and said they could vote the bill down when it returns to the Commons in the new year if the changes they wanted were not accepted.
ERG chairman Mark Francois, who was among those who abstained, told BBC News: “Our objection was that we don’t believe, as it’s currently drafted, the bill is firm enough to ensure that flights will take off to Rwanda.”
“The prime minister had said that he would entertain tightening up the bill. We’re taking him at his word,” he said.
“A number of MPs voted with the government tonight because they were told in private that there would be amendments later on.”
However, agreeing to their demands would create new problems for the government.
The centrist One Nation group, which includes more than 100 Tory MPs, had recommended that its members vote for the bill, but warned it would oppose any future amendments “that would mean the UK government breaching the rule of law and its international obligations”.
Tougher legislation may also be more difficult to get through the House of Lords.
One Nation chairman Damian Green told BBC News the vote had seen far fewer abstentions than expected and that “if the government sticks to its guns then it can probably get this legislation through intact”.
Home Office Minister Chris Philp said the government would listen to ideas from MPs on how to improve the bill.
“Like with any bill, government ministers will be talking to members of Parliament to see if there are ways of tightening this even further, to improve the drafting to make sure there are absolutely no loopholes at all,” he added.
The bill seeks to declare in UK law that Rwanda is a safe country to send asylum seekers to, after the Supreme Court ruled the policy was unlawful last month.
However, critics on the right of the party have argued it is not currently strong enough to prevent legal challenges to deportations.
A No 10 spokesperson said the bill was “the toughest legislation ever introduced to Parliament” and “makes clear that this Parliament, not any foreign court is sovereign”.
“We will now work to ensure that this bill gets on to the statute book so that we can get flights off to Rwanda and stop the boats,” the spokesperson added.
Labour voted against the bill, along with other opposition parties, and the party has said it would scrap the Rwanda plan if it wins the next election.
It says the millions of pounds given to Rwanda as part of the deal would be better spent tackling people-smuggling gangs.
Labour’s shadow home secretary Yvette Cooper said: “The Conservatives’ civil war is continuing, and the country is paying the price for this chaos.
“Today’s debate shows how weak Rishi Sunak is with this Tory psychodrama now dragging on into the new year.”