Theresa May will be obliged to present MPs with a new Brexit plan within three days if her current proposal is voted down next week, after a procedural amendment to the plan’s progress through the Commons was passed amid chaotic scenes.

The amendment to the business motion for the plan, drawn up by the Conservative former attorney general Dominic Grieve, gives May the deadline to put forward new plans if she loses the vote, as many expect, next Tuesday.

The amendment was passed by 308 votes to 297 following stormy scenes in which a series of Conservative MPs castigated the Speaker, John Bercow, for allowing the amendment.

Amid a series of furious points of order lasting more than an hour, a series of Conservatives argued that Commons precedent dictated that business motions could only be changed by ministers.

But Bercow, who won equally noisy support from Labour MPs and some remain-minded Conservatives, insisted he could make the decision, and would side with the interests of parliament over the executive.

A previous amendment by Grieve, voted through by the Commons before Christmas, means any statement that follows a defeat is in itself amendable – allowing MPs to put forward their own alternatives for the future of the Brexit process.

So if May came back with an alternative plan, that could be amended by MPs, giving parliament far more scope in setting the direction.

Downing Street had made clear that if next week’s vote were lost, the prime minister would, whether or not the amendment were passed, come back to the House of Commons and set out her plans well before the 21-day time limit set out in the Withdrawal Act.

“We would seek to provide certainty, quickly,” a government spokesman said, speaking to journalists after prime minister’s questions.

Bercow provoked fury from the Tory benches for selecting the amendment, which government sources alleged went against the advice of the House of Commons.

Andrea Leadsom, the leader of the House of Commons, said Bercow should publish the advice he received from the Commons clerks. A No 10 spokesman insisted the government had received clear advice that suggested the motion was not amendable.

“We are surprised the government amendment was selected; the advice we received was that it would not be in order,” he said.

Before the vote, MPs made heated points of order for more than an hour, many criticising the Speaker. In a febrile Commons chamber, some Tories shouted “pathetic” and “ridiculous” as Bercow spoke, though the Speaker was backed by roars of approval from Labour MPs.

Bercow argued that the motion prevented debate but did not prevent amendments, saying he was not obliged to cite precedent. He said he had consulted the clerks and the advice would remain private.

“I am clear in the mind that I have taken the right course,” he said. “The terms of the order, I must advise the house, do not say no amendment can be selected or moved. I cannot allow debate but I have selected the amendment.”

Bercow said that he did not think it was unreasonable to amend the motion and hinted he might routinely allow business motions to be amended by backbenchers.

“I understand the importance of precedence but it does not completely bind,” he said, as Leadsom shook her head. “If we were guided only by precedence nothing in our procedures would ever change.”

Earlier in the discussions on the floor of the house, the pro-leave Tory MP Peter Bone said he had been informed by officials that the motion was unamendable when he had inquired about his own amendment on Tuesday night.

The Conservative MP Mark Francois, a vice-chair of the pro-Brexit European Research Group, said: “I have never known any occasion where the Speaker has overruled a motion of the House of Commons … why are you overriding a motion of the house?”

Tory MP Ken Clarke, who backed the amendment, said those who did not like the amendment should “don a yellow jacket and go outside” to join some of the hard-right protesters who had harassed MPs outside parliament.

The amendment says that if the deal is defeated “a minister of the crown shall table within three sitting days a motion … considering the process of exiting the European Union under article 50”.

Earlier Grieve said the change was sensible given the time pressures. “I realise there are a few of my colleagues who believe that if the government’s deal is rejected we should simply do nothing and leave the EU on March 29 with no deal at all and with all, to my mind, the calamitous consequences that would follow on from it,” he told the BBC.

“I disagree with that, and so I think do the vast majority of members of parliament. The only way we can move forward if the government’s deal is not acceptable to parliament is for parliament to engage with government and find a solution, which is what I am trying to do.”

Other MPs who signed the amendment include the former Tory ministers Sir Oliver Letwin, Jo Johnson, Guto Bebb and Sam Gyimah. It has also been backed by Labour MPs including Stephen Doughty and Chris Leslie.

The latest blow for May comes a day after the government suffered a significant defeat on the finance bill, in which a powerful cross-party group of MPs led by Labour’s Yvette Cooper passed an amendment limiting the government’s tax administration powers in the event of the UK leaving the EU with no deal.

Its purpose was to prove there was a parliamentary majority to oppose no deal, and the cross-party group of rebels who organised Tuesday’s defeat and said they could seek to amend any and every piece of legislation the government brings to parliament between now and March.