Image copyright Getty Images

MPs, including Tories expelled from the party, are preparing legal action in case the PM refuses to seek a delay to Brexit.

A bill requiring Boris Johnson to ask for an extension to the UK's departure date to avoid a no-deal Brexit on 31 October is set to gain royal assent.

But the PM has said he would "rather be dead in a ditch" than ask for a delay.

Legal experts have warned the prime minister could go to prison if he refuses to comply with the new law.

MPs have lined up a legal team and are willing to go to court to enforce the law to avoid no deal, if necessary.

Meanwhile, pro and anti-Brexit protesters held demonstrations in Westminster on Saturday, with some people arrested by police.

The cross-party bill - which requires the prime minister to extend the exit deadline until January unless Parliament agrees a deal with the EU by 19 October - was passed on Friday.

Although the government has said it will abide by the law, Mr Johnson described it as obliging him "in theory" to write to Brussels asking for a "pointless delay".

Downing Street said the British public had been clear that they wanted Brexit done.

Labour leader Jeremy Corbyn told BBC News the party was not taking legal action over the legislation, but said it was "aware of the actions that are being discussed and prepared for".

He added that Labour would allow a general election "when we are clear that there will be an end to the danger of no-deal on 31 October".

"We need a clear statement from the prime minister that he is going to abide by that act of Parliament," Mr Corbyn said.

Image copyright AFP Image caption Protests were held across the UK and Europe on Saturday

Meanwhile, clashes erupted between pro-Brexit protesters and police in Parliament Square in London.

Several hundred people joined pro and anti-Brexit demonstrations in Westminster.

Pro-leave protesters were seen throwing a metal barricade at officers, while others tried to break the police cordon.

Anti-Brexit MP Anna Soubry, who leads the Independent Group for Change, said she had been due to speak at the March for Change rally in London but told organisers she was too frightened to do so, after consulting with police.

A spokesman for the Metropolitan Police said officers made 16 arrests in connection with the protests.

That included 13 arrests for violent disorder, one for possession of an offensive weapon, one for affray and one for a racially aggravated public order offence.

Some 35 other events were held across the UK and Europe, including a pro-democracy protest in Berlin.

'Dangerous precedent'

The Daily Telegraph reported that the prime minister said seeking another extension is "something I will never do", fuelling speculation that ministers could try to find a loophole.

But David Lidington, who resigned as Cabinet Office minister in July, in opposition to Mr Johnson's no-deal Brexit strategy, told the BBC's Today programme: "The government is bound by the words of any statute that has been duly enacted by the Queen in Parliament, which is a fundamental principle of our constitution and our ministerial code.

"Defying any law sets a really dangerous precedent."

He added that at a time when other countries were "holding up alternatives to the rule of law and democratic government" it was imperative that British governments always demonstrate they comply with the law.

Mr Lidington, who supported the government in voting for an early general election, urged Mr Johnson to "re-double [his] efforts" in talking to a "wide range" of European leaders to get a Brexit deal he can put before Parliament in October.

What are the PM's options?

Mr Johnson's options are "narrowing" after this week's Brexit defeats, says Dr Hannah White, deputy director of the Institute for Government.

Some possibilities being discussed are:

Ignore the law - Boris Johnson has said he "will not" carry out Parliament's instructions to seek an Article 50 extension, according to The Daily Telegraph. But unless he finds a legal loophole, this could land the prime minister in court and further divide his party

- Boris Johnson has said he "will not" carry out Parliament's instructions to seek an Article 50 extension, according to The Daily Telegraph. But unless he finds a legal loophole, this could land the prime minister in court and further divide his party Resign - He could quit as PM with the tactical aim of getting back in, letting Jeremy Corbyn go to Brussels for an extension before triggering a general election he would hope to win. Dr White calls this "risky", with no guarantee the Queen would nominate Mr Corbyn as interim leader. The tactic could otherwise backfire, going down badly with voters and handing other advantages to the opposition

- He could quit as PM with the tactical aim of getting back in, letting Jeremy Corbyn go to Brussels for an extension before triggering a general election he would hope to win. Dr White calls this "risky", with no guarantee the Queen would nominate Mr Corbyn as interim leader. The tactic could otherwise backfire, going down badly with voters and handing other advantages to the opposition A one-line bill - The PM could try again to secure an early election by proposing a "one-line bill" simply stating there will be one despite the Fixed Terms Parliaments' Act. It would need just a simple majority to pass but it is also "risky" because MPs could table amendments to it, including changing the election date

- The PM could try again to secure an early election by proposing a "one-line bill" simply stating there will be one despite the Fixed Terms Parliaments' Act. It would need just a simple majority to pass but it is also "risky" because MPs could table amendments to it, including changing the election date Scrap the law - If he could get an election before 19 October and win it with a majority, he could, in theory, repeal the new law and therefore not be required to request an extension.

- If he could get an election before 19 October and win it with a majority, he could, in theory, repeal the new law and therefore not be required to request an extension. EU veto - If the PM is forced to ask Brussels for an extension, there is no guarantee they will accept it. All 27 EU member states need to agree to it, so Mr Johnson could persuade one of the countries to veto it.

Commentators on PM's next move.

Former attorney general Dominic Grieve has warned the prime minister "could be sent to prison" if he refuses to obey the law and delay Brexit.

Mr Grieve told BBC News Mr Johnson would be "under an obligation" to abide by the law after it has received royal assent.

"If he doesn't, he can be taken to court which will if necessary issue an injunction ordering him to do it," he said.

"If he doesn't obey the injunction, he could be sent to prison."

Earlier the former director of public prosecutions Lord MacDonald told Sky News a refusal to delay Brexit in the face of court action "would amount to contempt of court which could find that person in prison".

One Tory MP said the idea of Mr Johnson ignoring the legislation was "nonsense".

Kevin Hollinrake, MP for Thirsk and Malton, tweeted: "Even if it was under consideration, which I'm sure it's not, you would see a very significant number of Conservative MPs resigning the whip, including me."

A number of cabinet sources have told the BBC in recent days that they have significant concerns about Number 10's strategy.

It comes in the wake of a series of Parliamentary defeats for the government, beginning after Mr Johnson announced his decision to suspend Parliament for five weeks in September and October.

First, the prime minister lost control of the House of Commons agenda.

That allowed opposition MPs and rebel Tories to put forward the bill to prevent a no-deal Brexit, which Mr Johnson said "scuppered" his negotiations with the EU.

In response, the prime minister expelled 21 of his own MPs for rebelling against the government over the vote and then called for a general election.

Media playback is unsupported on your device Media caption Brexit: Five days in five minutes

But on Friday, Labour, the Liberal Democrats, SNP and Plaid Cymru jointly agreed to reject Mr Johnson's demand for a snap poll before the EU summit in mid-October.

The day before, the prime minister's younger brother, Jo Johnson, resigned as an MP and minister, saying he was "torn between family loyalty and the national interest".

According to the Daily Telegraph, Mr Johnson wrote to Conservative Party members on Friday night, saying Labour MPs had "left us no choice" but to call for an election.

He said: "They just passed a law that would force me to beg Brussels for an extension to the Brexit deadline. This is something I will never do."

No 10 said an election would allow the public to choose between the government's approach - Mr Johnson's commitment to leave on 31 October, either with a re-negotiated deal or no deal - and "more delay, more dither" from Labour.

But opposition MPs say they will only agree to an election when the extension to the Brexit deadline has been secured, to ensure the UK does not "crash out" without a deal.

What does the no-deal bill say?

The bill, presented by Labour MP Hilary Benn, says the prime minister will have until 19 October to either pass a deal in Parliament or get MPs to approve a no-deal Brexit.

Once this deadline has passed, he will have to request an extension to the UK's departure date to 31 January 2020.

Unusually, the bill stipulates the wording of the letter Mr Johnson would have to write to the president of the European Council.

If the EU responds by proposing a different date, the PM will have two days to accept that proposal.

During that time, MPs - not the government - will have the opportunity to reject that date.

The bill also requires ministers to report to the House of Commons over the next few months. potentially providing more opportunities to take control of the timetable.