If passed, it would have given opponents of a no-deal Brexit the chance to table legislation to thwart the UK leaving without any agreement on the 31 October deadline.

The cross-party motion would have given MPs time to begin to pass legislation that may have significantly constrained a future prime minister, but Labour sources said they feared would-be Tory rebels had preferred to hold their fire until they see which candidate was installed.

The vote followed a debate in the House of Commons led by the shadow Brexit secretary, Keir Starmer, who urged MPs to back the cross-party effort, calling it a “safety valve”, so MPs can begin legislation to stop a new prime minister suspending parliament.

Speaking before the crunch vote on giving MPs control of the parliamentary agenda on 25 June, Starmer said MPs had to seize the opportunity to grant themselves time to stop a no-deal Brexit.

The motion proposed giving MPs control of the parliamentary agenda in a fortnight’s time. That day could then potentially be used to begin legislation to prevent the UK from leaving the EU without a deal – though it is still uncertain what form that would take.

Starmer said MPs were forced to act because of suggestions from leadership candidates including Johnson and Dominic Raab that the UK will leave – come what may – on 31 October, with Raab even suggesting he would be prepared to prorogue parliament to stop MPs efforts to thwart no deal.