Boris Johnson’s plan to fast-track his Brexit deal through parliament in time for next week’s October 31 deadline has been rejected by MPs, even after he threatened to pull his deal and press for a general election.
After a day of cajoling and inducements from the prime minister and the Conservative whips, the government lost a crunch vote by 322 to 308 – a majority of 14.
The legislation was only published late on Monday, and the Chancellor, Sajid Javid, declined to publish an economic analysis of the deal. Even some MPs minded to back Johnson’s deal said they could not accept such a truncated debate.
The House of Commons had earlier backed the second reading of the withdrawal agreement bill, by 329 votes to 299.
That appeared to signal there was a potential majority for the prime minister’s deal, although some of the Labour MPs who supported it said they could withdraw their backing at a later stage in its progress through the House of Commons if they were unable to amend it.
MPs have tabled a string of amendments, on issues including a customs union, environmental standards, and avoiding the risk of a no-deal exit at the end of 2020.
The Labour leader, Jeremy Corbyn, said: “We will seek a very clear commitment to a customs union, a strong single market relationship, hardwired commitments on workers’ rights, non-regression of environmental standards, and loopholes closed to avoid the threat of a no-deal Brexit once and for all.” 
Labour whips had earlier offered to discuss an alternative programme motion with the government, but Johnson was determined to make a final attempt to achieve his “do or die” deadline of leaving the EU on Halloween.
It is unclear whether the prime minister will pull his deal and ask parliament to back a general election instead.
The EU27 now appears likely to grant the delay to Brexit requested in the letter the prime minister reluctantly sent on Saturday evening, in compliance with the Benn act.
The rebellion against the programme motion was led by the former Tory chancellor Philip Hammond, and one of Johnson’s leadership rivals, Rory Stewart. They were keen to secure reassurances that if the government had not succeeded in negotiating a free trade agreement with the EU27 by the end of 2020, the UK would not leave without a deal.
Hammond told the Times the bill was “a camouflage to a no-deal Brexit at the end of 2020”. Stewart, another of the 21 Tories who had the party whip withdrawn last month, said he and some of his fellow rebels had negotiated through the night to give parliament more control over the next phase of the Brexit negotiations, including being able to vote for an extension to the talks.
During six hours of debate in the Commons yesterday, Dominic Grieve, the former Tory attorney general, accused the prime minister of “bullying” tactics.
The Justice Secretary Robert Buckland, winding up the debate for the government, made a last-minute concession to soft-Brexit Tories.
In response to a question from his predecessor David Gauke, he said the government would bring forward an amendment offering MPs a vote on extending the transition period by July next year, and that it would abide by it.