The latest confrontation took place in the unelected House of Lords, which on Monday voted 354 to 235 in favour of a plan that would allow parliament to shape the government’s next steps in the event that MPs reject the deal May negotiates with Brussels, or if she fails to negotiate one at all.

Now, a confrontation with pro-EU MPs awaits this week, expected to test May’s ability to lead a minority government. Ministers are seeking approval for the final wording of the legislation that will end Britain’s membership of the European Union – the legal cornerstone of May’s plan to withdraw from the bloc in March next year.

However, the government has fallen into a row with MPs in May’s own party who think parliament should have a greater say in the exit process than ministers want to give it. Ministers say they are confident of getting a divorce deal that parliament will accept, and that all discussion of the vote is hypothetical. Nevertheless, they insist parliament cannot be allowed to overturn Brexit or tie the government’s hand is negotiations. May’s Conservative Party does not have a majority in the Lords, and was expected to lose after compromise talks with rebel MPs broke down last week.

After an ill-judged election last year, May relies on the help of a deal with a small Northern Irish party to win votes in the Commons and cannot afford to more than a handful of Conservative rebels if she wants to avoid an embarrassing defeat.

Wednesday’s votes will be crucial for May’s attempts to resist a ‘meaningful vote’ plan that is seen as a step towards a softer Brexit – an outcome that would mean closer ties to the EU on issues such as customs and regulations. Failure to keep her party in line would also signal trouble for several other contentious pieces of legislation needed to prepare for Brexit, including on central issues such as trade and customs policy, said the Reuters report