Image copyright Getty Images

There is speculation that MPs could call for a vote of no confidence in the government, to try to stop a no-deal Brexit on 31 October.

But what is it and what happens if the government loses?

What is a no confidence vote?

It's a vote in which MPs from all parties decide whether they want the government to continue. It has the power to trigger a general election and could see a new prime minister appointed.

While any MP can propose a no confidence motion, there's no guarantee their request will be granted.

However, if the leader of the opposition - currently Labour leader Jeremy Corbyn - introduces the motion, convention means the government will provide time for a debate.

The wording of a no-confidence motion is: "That this House has no confidence in Her Majesty's Government."

It needs a simple majority to pass - so it only requires one more MP to vote in favour than the number voting against.

If the government wins the no confidence motion, it carries on as before. At present, the government cannot count on winning as it has a minority of seats in the House of Commons.

What happens if the government loses?

If the government loses, it has 14 days to try to win back the confidence of MPs through another vote. At the same time, opposition parties can try to form their own alternative government.

If nothing is resolved at the end of the 14-day period, the rules say a general election is automatically triggered.

At this point, the prime minister advises the Queen on the date the general election will take place.

Parliament will then dissolve 25 working days before polling day. When this happens, Parliament no longer sits and MPs stop being MPs while they campaign for re-election.

Would the PM have to resign?

If the government loses a confidence vote, the situation is similar to that of an election in which no one party wins a majority.

That means that the existing prime minister should only resign if it's clear someone else can command the support of the House of Commons.

However, if an alternative government is ready to take over, convention suggests that the PM should stand down.

Image copyright Getty Images

Yet there is nothing clearly stated in law that says the prime minister must do so.

Failing to step down would risk bringing the Queen into the Brexit dispute, as the monarch appoints PMs and, in theory, can dismiss one who behaves unconstitutionally.

Where do the parties stand on a no confidence vote?

Jeremy Corbyn says Labour wants to introduce a no confidence motion.

But he says it will only do this once the threat of a no-deal Brexit on 31 October has been removed.

However, the government accuses Labour of running scared. It says Labour should immediately bring a vote of confidence to end the Brexit stalemate.

If a no confidence vote were to pass, Jeremy Corbyn has urged MPs from all parties to install him as prime minister. Mr Corbyn says he would then immediately extend the Brexit deadline and ask Parliament to call an early election.

SNP leader Nicola Sturgeon has hinted she might back Jeremy Corbyn becoming a "caretaker" prime minister.

However, Liberal Democrat leader Jo Swinson says many MPs will not unite behind Jeremy Corbyn. Ms Swinson suggests that former Conservative chancellor Ken Clarke or former Labour deputy leader Harriet Harman should head a temporary government instead.

Image copyright Getty Images Image caption James Callaghan was the last PM to lose a no confidence vote

Previous no confidence votes

It's very rare for a government to lose a no confidence motion.

Before 2011, prime ministers could call a general election whenever they wanted to. That meant they could evade a possible no confidence vote by calling an election instead.

There's only been one occasion since World War Two when the government lost a no-confidence vote.

That was in 1979, when the Labour minority government fell and was replaced by Margaret Thatcher's Conservatives at the general election which followed.