Image copyright Getty Images

The government will "test to the limit" a new law designed to force it to seek an extension to the Brexit deadline if a deal is not reached by 19 October.

Foreign Secretary Dominic Raab said the government would abide by the law but would "look very carefully" at its "interpretation" of the legislation.

He said Britain remained committed to getting a deal with the EU.

The law, which should gain royal assent on Monday, aims to stop the UK exiting the EU with no deal on 31 October.

Prime Minister Boris Johnson has been warned he could face legal action if he chooses to flout it.

Mr Raab called the legislation "lousy" and said it "weakened" the government's negotiating position in Brussels.

"That legislation is lousy, it envisages multiple delays, it would effectively force us to accept conditions from the EU however vindictive, punitive and harsh they may be," he told Sky News' Sophy Ridge on Sunday programme.

He added: "We will adhere to the law but we will also - because this is such a bad piece of legislation - want to test to the limit what it actually lawfully requires."

He insisted testing the law's limits is "the responsible thing to do" and accused Labour leader Jeremy Corbyn of dragging the country "into the quicksand".

Chancellor Sajid Javid said the government "absolutely will not" ask the EU to extend the date of Brexit, adding: "We will leave on 31 October."

Asked how this would work, he told the BBC's Andrew Marr programme: "You will have to wait and see what happens because there is a lot of days between now and 19 October."

Video caption Sajid Javid: "Our policy is unchanged... we will be leaving on 31 October"

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

It is thought that Mr Johnson believes he could legally disregard some or all of the bill's requirements.

This could lead to an emergency judicial review by the Supreme Court next month.

Justice Secretary Robert Buckland said he had spoken to the prime minister about the importance of the rule of law.

In a tweet, Mr Buckland said he supported Mr Johnson, saying speculation that he might resign from cabinet was "wide of the mark".

Sorry, this Twitter post is currently unavailable.

Earlier, shadow chancellor John McDonnell said the country was in "an extremely serious constitutional position" and that "no-one can trust" what might happen with Mr Johnson as PM.

"We've got to prevent Boris Johnson from forcing through a no-deal because of the damage it could do for our country," he told Andrew Marr.

Mr McDonnell said he believed the prime minister might wait until no-deal was the only option but warned calling an election would not solve the problem.

"We don't believe that we can pin him down and I don't trust him an inch. I don't think anyone does."

Video caption Shadow chancellor John McDonnell: "We don't trust the PM an inch"

Shadow attorney general and Labour peer Baroness Chakrabarti called the government's position "irresponsible and elitist".

"The idea there's one law for Boris Johnson and his mates and another law for everyone else, it's appalling," she told Sky News.

She added: "Every tin-pot dictator on the planet throughout history has used the excuse of having the people on their side to break the law, to shut down Parliament and all the rest of it."

She said the legislation was "crystal clear" and Boris Johnson was "personally" duty-bound to comply with it.

Amber Rudd, the latest high-profile figure to resign from the government said the government "must obey the law".

What is the new law?

The bill, which is set to receive royal assent on Monday, was presented by the Labour MP Hilary Benn and backed by opposition parties and the recently expelled Tory MPs.

It gives Mr Johnson until 19 October to either pass a deal in Parliament or get MPs to approve a no-deal Brexit.

After this deadline, he would have to write to the EU asking for an extension to the UK's departure date from 31 October to 31 January 2020.

The bill outlines the wording of the letter that the prime minister would have to write to the president of the European Council..

If the EU proposes a different date, the PM must accept it within two days.

But during this two-day period, MPs - not the government - would be able to reject the EU's date.

Ministers will also be compelled to give the House of Commons Brexit progress updates over the following months.

Election moves continue

The battle over who will control the timing of the next general election continued on Sunday ahead of another vote on an autumn general election.

The government is again going to ask MPs to back its call for a snap election when they return to the Commons on Monday. A similar move on Wednesday failed to secure the necessary two-thirds majority required.

Writing in the Mail on Sunday and Sunday Express newspapers, Mr Johnson said "this government will simply carry on" should Labour leader Jeremy Corbyn refuse to agree to an early election.

Opposition parties have agreed not to back his demand for a general election before the EU summit in mid-October, and say they will vote against the government's latest proposal.

Politicians from all parties are attempting to clarify their positions, ahead of a likely general election.

Sajid Javid has insisted the Conservatives have "no need" for a pact with the Brexit Party. He told the Andrew Marr Show: "We don't need an electoral alliance with anyone. We can stand on our own two feet."

Sam Gyimah - one of the 21 Tories expelled from the parliamentary Conservative party this week - says he intends to stand in East Surrey as an independent candidate and will ask Remain parties not to field candidates against him.

John McDonnell wants an election "as soon as we possibly can" - once the threat of a no-deal Brexit has been removed - but ruled out making any deals with the SNP: "If we are in a minority, we will be a minority government, we won't do coalitions."

The Conservative Party intends to stand a candidate against Speaker John Bercow at the next election, in retaliation for his role in allowing MPs to take control of the Commons agenda. Business secretary Andrea Leadsom accused the MP for Buckingham of "flagrant abuse" of his impartial role as Speaker.

Former Foreign Secretary Jeremy Hunt warned in a tweet that "divided parties don't win elections" as he urged "a cold shower of generosity and magnanimity from all".

What questions do you have about the latest Brexit developments? Let us know and a selection will be answered by a BBC journalist.

Use this form to ask your question:

If you are reading this page on the BBC News app, you will need to visit the mobile version of the BBC website to submit your question on this topic.