Media playback is unsupported on your device Media caption Theresa May: The rejection of the EU withdrawal agreement will have "grave" implications

MPs have rejected Theresa May’s EU withdrawal agreement on the day the UK was due to leave the EU.

The government lost by 344 votes to 286, a margin of 58, and means the UK has missed an EU deadline to delay Brexit to 22 May and leave with a deal.

The prime minister said the UK would have to find "an alternative way forward", which was "almost certain" to involve holding European elections.

Labour's Jeremy Corbyn said "this deal now has to change" or the PM must quit.

Meanwhile, thousands of Leave supporters gathered outside Parliament to protest against the delay to Brexit, bringing traffic to a standstill.

Mrs May now has until 12 April to seek a longer extension to the negotiation process to avoid a no-deal Brexit on that date.

Please upgrade your browser to view this interactive How did your MP vote on the withdrawal agreement? Enter a postcode, or the name or constituency of your MP Seat vacant

With a clear majority in the Commons against a no-deal Brexit, and with MPs holding more votes on alternative plans on Monday, Mrs May said that the UK would have to find "an alternative way forward".

The prime minister said that the outcome was "a matter of profound regret", adding that "I fear we are reaching the limits of this process in this House".

Downing Street said it was still not an "inevitability" that the UK would have to take part in elections to the European Parliament in May.

It is highly likely that at least for another couple of weeks, Theresa May will look through every nook and cranny in Parliament to see if there is a way for her deal to pass through - somehow.

But that's a decision taken in the bunker, and the walls are closing in.

There is little reason tonight to think that, in the end, the burning core of Euroscepticism in the Tory Party will ever accept her deal.

There are few signs that any more than a handful of Labour MPs are really going to take the plunge and ultimately walk through the same lobbies as Theresa May, and Boris Johnson and Iain Duncan Smith.

The prime minister concluded today that our political process is reaching its limits.

But maybe soon it will be her leadership, her deal, that has passed its limits.

A No 10 source indicated that the prime minister would continue to seek support in the Commons for her deal.

"Clearly it was not the result we wanted. But, that said, we have had a number of senior Conservative colleagues who have felt able to vote with the government today. They have done so in higher numbers than previously," the source said.

"Clearly there is more work to do. We are at least going in the right direction."

Downing Street said Mrs May would continue to talk to the Democratic Unionist Party about more reassurances over the Irish backstop, which it says risks splitting Northern Ireland from the rest of the United Kingdom.

But the DUP's leader at Westminster leader, Nigel Dodds, told the BBC's Newsnight political editor Nick Watt: "I would stay in the European Union and remain, rather than risk Northern Ireland's position. That's how strongly I feel about the Union."

Media playback is unsupported on your device Media caption Jeremy Corbyn: "This deal now has to change"

Responding to the vote, European Council President Donald Tusk tweeted: "In view of the rejection of the Withdrawal Agreement by the House of Commons, I have decided to call a European Council on 10 April."

In a statement, the European Commission said the UK would have to "indicate a way forward" by 12 April "for consideration by the European Council".

"A 'no-deal' scenario on 12 April is now a likely scenario. The EU has been preparing for this since December 2017 and is now fully prepared for a 'no-deal' scenario at midnight on 12 April. The EU will remain united," the statement said.

"The benefits of the withdrawal agreement, including a transition period, will in no circumstances be replicated in a 'no-deal' scenario. Sectoral mini-deals are not an option."

Will European leaders accept a longer delay to Brexit?

Despite all the drama, the money and time spent by EU leaders on Brexit (summits, dedicated governmental departments, no-deal planning) and all the hard, hard graft put in by the EU and UK negotiating teams, Europe's leaders are asking themselves what there is to show for it all.

Ongoing Brexit divisions in Parliament, in government and in Theresa May's cabinet were on screaming technicolour display again last week.

EU leaders used to use the threat of a no-deal Brexit as a negotiating tactic (as did the UK). They now believe it to be a very real prospect.

That has led to a number of countries - notably France - questioning the logic of delaying Brexit for much longer.

They wonder if the UK will ever unite around a Brexit Way Forward - be it a softer Brexit, no deal or no Brexit.

Would a Brexit extension, allowing for a general election or a second referendum, really settle the issue, they ask?

Read Katya's blog in full

What happens next?

Monday, 1 April: MPs hold another set of votes on various Brexit options to see if they can agree on a way forward

MPs hold another set of votes on various Brexit options to see if they can agree on a way forward Wednesday, 3 April: Potentially another round of so-called "indicative votes"

Potentially another round of so-called "indicative votes" Wednesday, 10 April : Emergency summit of EU leaders to consider any UK request for further extension

: Emergency summit of EU leaders to consider any UK request for further extension Friday, 12 April: Brexit day, if UK does not seek/EU does not grant further delay

Brexit day, if UK does not seek/EU does not grant further delay 23-26 May: European Parliamentary elections

Media playback is unsupported on your device Media caption The result is announced as MPs vote by 286 to 344 to reject the government’s withdrawal agreement

Labour leader Jeremy Corbyn said: "The House has been clear, this deal now has to change.

"There has to be an alternative found. And if the prime minister can't accept that then she must go, not at an indeterminate date in the future but now.

"So that we can decide the future of this country through a general election."

Steve Baker, deputy chairman of the European Research Group of Brexiteer Conservatives, said it was time for Mrs May to quit.

"This must be the final defeat for Theresa May's deal. It's finished. And we must move on.

"It has not passed. It will not pass. I regret to say it is time for Theresa May to follow through on her words and make way so that a new leader can deliver a withdrawal agreement which will be passed by Parliament."

Mr Baker was one of 34 Conservative rebels to vote against the agreement, along with the Democratic Unionist Party and the Labour Party. Five Labour MPs voted for the agreement.

A number of high profile Tory Brexiteers, including Dominic Raab and Iain Duncan Smith, did vote for the agreement, but it was not enough to prevent another damaging defeat for Mrs May, who had offered to stand down to persuade her critics to back the deal.

This was not a third "meaningful vote" on the PM's EU deal, which also includes a political declaration on future relations between the UK and the EU, and which has previously been rejected by larger margins.

By holding a vote on the withdrawal agreement only, the government had hoped to secure a short delay to Brexit and avoid the UK taking part in May's European elections.

MPs are set to have another go at reaching a Brexit compromise in another series of votes on Monday and Wednesday next week.

If one of the options receives a majority, the government could use it as a basis for negotiating changes to the political declaration.