British Prime Minister Theresa May has survived a key rebellion in her own party as she struggles to control opposing factions.
MPs voted against the Tory Remainers rebel amendment on a customs union by 307 to 301 in favour.
If it had passed, the Government would have been committed to entering a customs union with the European Union unless an alternative plan is agreed by mid-January.
May has repeatedly ruled out being in a customs union with Brussels after Brexit on the grounds it would leave Britain too closely tied to the EU.
The win means she has seen off a challenge from the anti-Brexit MPs in her party following her decision to accept amendments tabled by Brexiteers, but it won't settle the deep division in the Conservatives over how to move forward from here.
The Government earlier lost a vote on keeping the UK in the European Medicines Agency after Brexit by a margin of 305 to 301.
This was only the second loss for the Prime Minister on crucial Brexit legislation in the Commons.