London (CNN)The UK Government has lost a key Brexit vote, with the upper House of Parliament backing calls to remain in the EU customs union after Brexit.
The House of Lords voted 348 to 225 to amend the government's EU Withdrawal Bill, which will now return to the House of Commons where the defeat is likely to spur renewed opposition.
The amendment requires the government to report to Parliament by October 31 on what steps it has taken to remain in the customs union, which allows goods to flow freely across the European Union.
The government opposed the amendment. Prime Minister May had previously said Britain will not remain in the customs union after Brexit takes effect.
The House of Lords is now considering other amendments to the proposed legislation.
What is the customs union?
The customs union enables the 28 EU member states, and other countries such as Turkey that have signed up to its rules, to function as a single trading area.
In practice, it means that cars made in France can be sent to Italy without facing tariffs or a customs check at the border. Goods made outside the union are allowed to circulate freely once they've gained initial entry.
However, membership prevents a country from negotiating its own bilateral trade deals with other nations.
The ability to agree new trade deals -- with the United States or China, for example -- is central to Prime Minister Theresa May's vision for Britain after Brexit. In a speech in September, she ruled out staying in the customs union.
The government said it regretted the defeat. "The fundamental purpose of this bill is to prepare our statute book for exit day, it is not about the terms of our exit," a spokeswoman for the Department for Exiting the European Union said in a statement.