Image copyright HOC Image caption The government lost by 11 votes

Rebel Conservative MPs have joined forces with Labour to inflict a fresh blow on Theresa May's government in a Commons Brexit vote.

It means the government will have to come up with revised plans within three days if Mrs May's EU withdrawal deal is rejected by MPs next week.

It could also open the door to alternatives, such as a referendum.

No 10 said Mrs May's deal was in the national interest but if MPs disagreed, the government would "respond quickly".

The setback for the PM came as MPs started five days of debate on the withdrawal agreement with the EU, and the framework for future relations, ahead of the meaningful vote next Tuesday.

The government was expecting to have 21 days to come up with a "plan B" for Brexit if, as widely expected, Mrs May's deal is voted down.

But MPs backed calls for it to respond within three working Parliamentary days, a deadline likely to fall on Monday 21 January.

Theresa May lost by 11 votes, with 297 MPs siding with the government and 308 against.

Among those voting against were 17 Conservatives, including former ministers Justine Greening, Sam Gyimah and Jo Johnson who want to see another referendum to decide whether the UK should leave or not.

See how your MP voted by searching below.

Please upgrade your browser to view this interactive Did my MP vote For or Against Dominic Grieve's amendment? Enter a postcode, or the name or constituency of your MP

If you can't see the look-up click here.

Former attorney general Dominic Grieve, the Conservative MP who led the rebellion, said he hoped for a "serious dialogue" between government and Parliament on alternatives to Mrs May's deal to avert a possible crisis.

He told ITV's Peston that it would be up to Mrs May to decide what she wanted to do if her deal was rejected, but MPs would be able to vote on any motion she put forward within seven days.

While the PM would have the right to say she wanted the Commons to re-consider her deal, he said MPs could amend the motion, telling her in effect "we want you to do something else".

Fellow rebel Sarah Wollaston said she and other MPs opposed to a no-deal exit were engaged in a "guerrilla campaign" to show that it would never get the consent of Parliament.

'Huge implications for Brexit'

Media playback is unsupported on your device Media caption Bercow: "Anti-Brexit sticker belongs to my wife"

By BBC Parliamentary Correspondent Mark D'Arcy

The new Grieve amendment, now passed by MPs, means that in the event the PM loses next week, the Commons will then have a chance to vote on alternative policies - everything from a "managed no-deal" to a further referendum, via a "Norway option" or a reheated version of the current deal, could be on the table.

If a majority could be found for anything, it would not have the force of law - but it would at least indicate a policy which had the support of MPs.

This is, in short, a massive ruling by the Speaker, made, apparently, against the advice of the Commons Clerk, Sir David Natzler.

I don't want to delve too deeply into the arcana of Business of the House motions only amendable by ministers of the Crown, but this drove a coach and horses through accepted normal practice, and will have huge implications for the course of Brexit.

Read Mark's full blog

But Conservative Brexiteer Jacob Rees-Mogg, who favours leaving without a withdrawal agreement, said it would not stop the UK exiting on 29 March.

"It merely requires a motion to be tabled not even debated," he said.

And prisons minister Rory Stewart, who backs the PM's deal, said requiring Mrs May to restart complex negotiations with the EU and come back with changes in three days, was "unreasonable".

He said Mr Grieve was "trying to provide more support for what he wants, which is a second referendum".

Downing Street said it would consider the repercussions of Wednesday's defeat but its intention had always been to "provide certainty" as soon as possible.

Labour has said it will table a motion of no confidence in the government if Mrs May's deal is voted down.

Shadow Brexit secretary Sir Keir Starmer said Parliament had to "take control of what happens next" and suggested delaying the date of the UK's exit beyond 29 March might be "inevitable".

He warned the UK's options were narrowing given the need to avoid, at all costs, a no-deal exit which he claimed was "simply not viable for practical reasons".

Commons Speaker John Bercow faced an angry backlash from some Conservative MPs over his decision to allow MPs to vote on the issue.

Quick guide: What is a no-deal Brexit? A "no-deal" Brexit is where the UK would cut ties with the European Union overnight without a transition period. Theresa May's government, and many others, believe this would be hugely damaging and want a more gradual withdrawal. But if Parliament can't agree on that, and nothing else takes its place, the UK could still leave without a deal. This would mean the UK would not have to obey EU rules. Instead, it would need to follow World Trade Organization terms on trade. Many businesses would see new taxes on imports, exports and services, which are likely to increase their operating costs. That means the prices of some goods in UK shops could go up. The UK would also lose the trade agreements it had with other countries as a member of the EU, all of which would need to be renegotiated alongside the new agreement with the EU itself. Manufacturers in the UK expect to face delays in components coming across the border. The UK would be free to set its own immigration controls. However some UK professionals working in the EU and UK expats could face uncertainty. Some countries, such as Spain, Germany and the Netherlands, have given temporary guarantees about residency status and rights, but there is not yet an agreed policy for UK citizens across the EU in the event of a no-deal Brexit. The situation for holidays and business trips is a little clearer, as the European Commission has said that even in a no-deal scenario, UK travellers won't need a visa for short visits of up to 90 days. The border between Northern Ireland and the Irish republic would become an external frontier for the EU with customs and immigration controls, though how and where any checks would be made is not clear. Some Leave supporters think that leaving without a deal would be positive if the right preparations were made. They say criticism is scaremongering and any short term pain would be for long term gain. But critics - including both Brexit supporters and opponents - say that leaving without a deal would be a disaster for the UK: driving up food prices, leading to shortages of goods and gridlock on some roads in the South East resulting from extra border checks.

The MPs claim Mr Bercow broke Commons rules and ignored the advice of his own clerks.

Commons leader Andrea Leadsom was among MPs to challenge his ruling in a series of points of order after Prime Minister's Questions.

They argued that the business motion, tabled by the government, was not amendable and said the Speaker was breaking with precedent.

Mr Bercow said he had made an "honest judgement" after consulting his clerks but rejected calls from Ms Leadsom to publish the advice he had received.

He insisted he was "not setting himself up against the government but championing the rights of the House of Commons", adding that if people wanted to vote against the amendment they could.

But a number of Tory MPs said the decision cast doubt on Mr Bercow's impartiality, with Crispin Blunt questioning whether he remained a "neutral referee of our affairs".

The Commons defeat was the second in the space of 24 hours for the government on Brexit.

On Tuesday, MPs, headed by former Tory ministers Mr Grieve and Oliver Letwin, defied the government on an amendment aimed at making it more difficult to leave the EU without a deal.

The clashes in the Commons came as the PM, who cancelled a vote on her deal last month at the last minute to avoid a humiliating defeat, launched a fresh push to convince MPs.

She is hoping new proposals on Northern Ireland will change enough MPs' minds to save the deal.

Under the plans, the Northern Ireland Assembly would have a say on new EU rules if the backstop plan to prevent physical checks on the Irish border comes into force after Brexit.

But the Democratic Unionist Party, on whom Theresa May relies for her Commons majority, have already rejected the so-called "Stormont lock" plans as "cosmetic" and "meaningless".

Ministers have also accepted calls for MPs to be able to vote next year on alternatives to activating the backstop, such as extending the proposed 21-month transition period.

Need some guidance?

If you feel like you ought to know more about Brexit...