LONDON (Reuters) - The House of Lords inflicted an embarrassing defeat on Theresa May’s government on Wednesday, challenging her refusal to remain in a customs union with the EU after Brexit.

May, who has struggled to unite her Conservative Party over Brexit, has said Britain will leave the European Union’s single market and customs union after it quits the bloc next March so that London can forge its own free trade deals.

That stance has widened divisions not only within her own party but across both houses of parliament, emboldening the House of Lords, where the Conservatives do not command a majority, to hand her the defeat. Britons at large have remained deeply split since the narrow June 2016 vote to leave the EU.

By a vote of 348 to 225, the Lords supported an amendment to her Brexit blueprint, the EU withdrawal bill, requiring ministers to report what efforts they had made to secure a customs union by the end of October.

It does not explicitly say Britain must reach a deal on such a union and a government source said it would not change policy.

Lord (John) Kerr, a supporter of staying in the EU at the 2016 referendum, opened the debate by saying the government should be asked to explore the possibility of securing a customs union to limit “the damage to the country’s wellbeing”.

His comments were met by criticism from pro-Brexit peers, who agreed with Viscount (Matthew) Ridley’s description of the amendment as “an attempt to wreck this bill and wreck Brexit”.

A spokeswoman for the Brexit ministry expressed disappointment over the amendment, saying “the fundamental purpose of this bill is to prepare our statute book for exit day, it is not about the terms of our exit”.

It is the first of several defeats the government is expected to suffer in the House of Lords over the remaining stages of the debate in coming weeks.

Britain's Prime Minister Theresa May walks out of 10 Downing Street in London, Britain, April 18, 2018. REUTERS/Toby Melville

After the Lords, the bill will return to the House of Commons, possibly as early as next month. Both houses have to agree on the final wording of the bill before it can become law.

HOUSE UNDER FIRE

After losing the Conservatives’ parliamentary majority in an ill-judged snap election last June, May relies on the support of a small Northern Irish party to pass legislation.

Many who supported the amendment in the unelected Lords have been keen to underline that, rather than dictating policy to the government, they were instead giving May a chance to consider alternative ways of leaving the European Union.

Some may be fearful over their future.

There have been several attempts to reform the Lords, home to around 800 members and often the focus of criticism over their enjoyment of generous allowances.

But by choosing to target the customs union, the peers have touched on one of the main flashpoints in the Brexit debate.

The main opposition Labour Party says it would want a new customs union if it was in charge of the Brexit negotiations. May’s trade minister, Liam Fox, and others see such a deal as anathema if it prevents London negotiating its own trade deals.

A customs union that sets external tariffs for goods imported into the EU, and allows them to flow freely, would offer a solution to the problem of ensuring no return to a hard border with the bloc on the island of Ireland.

According to one of her former officials, May could seek a compromise on a customs deal if it meant safeguarding the union of the United Kingdom by preventing the return of a hard border with EU member Ireland - with all the risks that could pose to the 1998 peace accord in Northern Ireland between Irish nationalist Catholics and pro-British Protestants.

For now, May’s government is sticking to its plan and Brexit supporters showed little sign of concern.

“I don’t think it (Wednesday’s Lords vote) will have the intended effect,” David Jones, a Conservative lawmaker and former Brexit minister, said on Tuesday.