LONDON — Britain’s main opposition party said Monday that it wants the U.K. to remain in a customs union with the European Union after it leaves the bloc — a small but significant shift that could push the government toward a softer version of Brexit.

Labour Party leader Jeremy Corbyn clarified his party’s previously convoluted position on Brexit, saying the U.K. must retain close economic ties with the EU, including a tariff-free customs deal. That is something Prime Minister Theresa May’s Conservative government appears to have ruled out.

“Labour would seek to negotiate a new, comprehensive U.K.-EU customs union to ensure there are no tariffs with Europe and to help avoid any need whatsoever for a hard border in Northern Ireland,” Corbyn said in a speech

The future of the currently invisible border between Northern Ireland, which is in the U.K., and EU member Ireland is one of the thorniest issues in Brexit negotiations.

May argues that staying in a customs union, which allows goods to travel freely within the EU and imposes tariffs on many goods from outside the bloc, would limit Britain’s freedom to strike new trade deals around the world after it leaves the EU in 2019.

But her stance has angered some in her party who support a “soft Brexit” that sees Britain retaining close economic ties with the EU, the country’s biggest trading partner.

Corbyn’s speech could increase the likelihood of Conservative rebels uniting with Labour lawmakers to win a vote in Parliament committing Britain to a customs union with the bloc.

The government said Corbyn’s plan would tie Britain’s hands on trade deals outside what will then be the 27-nation EU while forcing the country to comply with EU rules over which it had no say.

“Labour’s confused policy would be bad for jobs and wages, it would leave us unable to sign up to comprehensive free trade deals, and it doesn’t respect the result of the referendum,” said International Trade Secretary Liam Fox.

May plans to reveal the government’s vision of Britain’s future relationship with the EU in a speech on Friday.

Like the Conservatives, Labour is divided over Brexit. Most Labour lawmakers argued for remaining in the EU and now back a soft Brexit. But many represent constituencies that voted to leave, and are wary of angering Brexit-backing voters.

Corbyn, a veteran left-winger, has long been critical of the EU and expressed lukewarm support for staying in the bloc during the 2016 membership referendum campaign.

In his speech on Monday in Coventry — home of Britain’s auto industry, which is closely entwined with the EU — he tried to chart a middle course. Corbyn said Brexit “will not solve all our problems,” but will not “inevitably spell doom for our country.”

In most respects Corbyn’s vision of Brexit was not radically different from that espoused by May’s Conservatives. He said Labour sought “a bespoke, negotiated relationship” with the EU, and insisted Britain must still be able to negotiate trade deals while remaining in a customs union.

He said Britain should have “a new and strong relationship” with the EU’s single market, but not remain a member of it. Staying in the single market would prevent Britain from limiting EU immigration, a key issue for many Brexit supporters.

There is no guarantee the EU would accept such terms. Leaders of the bloc have said repeatedly that Britain must be fully in or out of the single market and customs union, and cannot “cherry pick” benefits of membership without simultaneously bearing the responsibilities.

European Council President Donald Tusk said Friday that the British position on future relations appeared to be “based on pure illusion.”