MPs have given Boris Johnson a brutal preview of the scale of the challenge facing his premiership, as Conservative rebels voted to block any attempt to suspend parliament in order to force through a no-deal Brexit.

The new measure was passed by a hefty 41-vote majority, after a day of drama in Westminster which saw the resignation of one minister and abstentions from four rebellious cabinet ministers, who will soon be on the backbenches, as well as half a dozen others.

Among ministers who defied the whip and did not vote on the complex backbench amendment were the chancellor, Philip Hammond; the justice secretary, David Gauke; the business secretary, Greg Clark; and Rory Stewart, the international development secretary.

Hammond, who will end three years as chancellor next week, warned the next prime minister that he would be at the forefront of Conservative MPs opposing a no-deal Brexit.

“If they are genuinely seeking a deal, then they have my full support. If not, I’ll fight no deal every inch of the way,” Hammond said.

The chancellor thinks that despite change at No 10, opposition in parliament means there is no more chance of a no-deal Brexit than there was before Theresa May announced she was stepping down.

Jeremy Hunt, the foreign secretary and Johnson’s rival for the Tory leadership, was also absent from the voting lists, and later admitted that he did so by accident after wrongly thinking he had been excused.

Margot James, the digital industries minister, quit her job to vote in favour of the amendment from Hilary Benn and Alistair Burt attached to a bill about Northern Irish affairs, but there was no action taken against Hammond and the other frontbench abstainers.

May’s spokesman said she was “obviously disappointed” at the abstentions, but that it was now up to Johnson or Hunt to decide what to do with rebellious ministers once one of them becomes leader.

“No doubt her successor will take this into account when forming their government,” a Downing Street spokesman said, in a coded warning both to ministers about their futures, and to Johnson about the state of the rebellious parliament he is set to inherit.

Should Johnson win the Tory leadership contest and become prime minister, ministers are likely to pre-emptively walk out, forming an instant and influential Conservative bloc opposing no-deal Brexit – one towards which other Tories, perhaps even May, might gravitate.

Among the 17 Conservatives who backed the amendment on Thursday was Tory veteran Keith Simpson, who said it was the first time he had defied party whips during 22 years in parliament.

“This is a huge national issue,” he said. “I said months ago to my local paper and my association that I was totally against no-deal. So this is the first time I have rebelled but you can get a taste for it.”

The success of the amendment by 315 votes to 274 also presents any Johnson government with a very practical obstacle, as well as serving as an example of the ingenuity of backbench rebels in thwarting his Brexit plans.

Q&A What does 'prorogue parliament' mean? Show Hide Prorogation is the official term that marks the end of a parliamentary session. After being advised to do so by the prime minister, the Queen formally prorogues parliament. This takes the form of an announcement in the House of Lords on the Queen’s behalf. It is a speech, written by the government, which usually describes the bills that have been passed during that session and summarises what has been achieved. It means that all work on existing legislation stops, and MPs and Lords stop sitting. Prorogation also automatically kills any bills, early day motions or questions to ministers going through parliament. Parliament can then be reopened a few days later with a fresh slate of legislation intentions, set out in a new Queen’s speech at the formal state opening of parliament.

While Johnson has said he is not overly keen on the idea of proroguing, or suspending parliament to prevent MPs blocking an overt no-deal policy, he has pointedly refused to rule this out.

The amendment now makes this markedly more difficult, building on a series of amendments in the Commons and Lords to dictate that ministers must report regularly to the Commons up to and beyond the Brexit deadline.

The host bill is a largely technical measure connected to elections and budgets for the long-suspended Northern Ireland government, and an initial attempt by Conservative remainer Dominic Grieve to attach an explicitly prorogation-blocking amendment was quashed by the Speaker, John Bercow.

Bercow did, however, allow another Grieve-tabled amendment, requiring a minister to report to the Commons every two weeks until December on the progress of talks on restoring the Northern Ireland assembly, which was passed last week by a single vote.

This was beefed-up by further amendments in the House of Lords. On Wednesday, peers added the condition that the fortnightly reports must be debated in the Commons. When the Lords amendments returned to the Commons, Bercow accepted the Benn-Burt amendment which then made explicit the requirement for the chamber to sit if it had been prorogued.

While the combined amendment does make prorogation difficult, a no-deal departure is still the default option on the Brexit deadline of 31 October unless Johnson or Hunt are able to swiftly conclude a new departure deal, something the EU has dismissed as extremely unlikely.

The vote came on the day the government’s independent forecasting body predicted a no-deal Brexit would plunge Britain into a recession that would shrink the economy by 2%, push unemployment above 5% and send house prices tumbling by around 10%.

The Office for Budget Responsibility said the result would be a year-long downturn that would increase borrowing by £30bn a year, prompting a fresh warning from Hammond to MPs backing no-deal Brexit.

After her resignation, James said the majority for the amendment had been emphatic because of the concerns of so many ministers and ex-ministers who rebelled or abstained. She hinted more resignations could follow if Johnson was confirmed as leader next Tuesday.

“I think we have to wait and see what happens next. Jeremy Hunt would behave in an appropriate way, he does not believe in proroguing parliament, which is just too extreme, so I don’t expect people to resign until they know for sure what the outcome is next week,” she said.

“It is difficult for anyone to resign, yes, and very difficult for me. I love my job and I felt I still had lot more to do. Unless you are completely sure, it is very hard. And I’ve been through the lobby to support the prime minister’s deal three times.

“My constituents voted emphatically to leave and I will honour that. But when it comes to protecting the right of parliament, that is really important.”

This Commons vote shows how weak a Boris Johnson government would be | Rafael Behr Read more

The Eurosceptic Johnson-backer, Anne-Marie Trevelyan, said colleagues rebelling were risking an election and a Labour victory.

“I can’t understand why my colleagues are voting with Jeremy Corbyn on this. Do they want a hard-left government to take control of their country?” she said. “Their disruptive amendments are cynical and corrosive but they don’t change the underlying legal realities one jot: we are leaving on 31 October with or without a deal.”

No 10 has said it opposed the amendments being tacked on to the Northern Ireland bill because they were an inappropriate use of a technical measure.

May’s spokesman said: “In the light of the ongoing talks to restore the executive, our view is that forcing a report and debate every two weeks on the progress of those talks risks being counter-productive to this overarching aim.”

The Commons process also saw MPs vote overwhelmingly to agree to a series of non-Brexit related Lords amendments to the bill, including one setting out a clear timetable for the extension of abortion rights and equal marriage to Northern Ireland, agreed in principle by MPs in landmark votes last week.