Opposition parties could oust Boris Johnson as prime minister through a vote of no confidence in the government as early as next week, a senior SNP MP has said.

Stewart Hosie said the plan - to put in place an interim government to secure a Brexit extension - appeared to be the only way to ensure Britain did not "crash out" of the EU on October 31.​

Labour leader Jeremy Corbyn told reporters at a rally in Chingford, Essex, he stands ready to lead an interim government if Mr Johnson was forced from No 10.

He added the prospect of an interim government was "getting more likely every day".

However, Mr Hosie acknowledged that in order for a vote of no confidence to succeed, it would require all the opposition parties to get behind it.​

While the SNP have indicated they could support a temporary government led by Mr Corbyn, the Liberal Democrats and many of the Tory rebels who had the whip withdrawn have made clear they are not prepared to put the Labour leader in No 10.​

Mr Hosie however warned that they may have no other option if they were serious about preventing a no-deal Brexit and securing a further extension to the Article 50 withdrawal process.​

Asked if he was ready to become an interim prime minister if necessary, Mr Corbyn said: "Absolutely."

He added: "The normal process is that when a government collapses, the leader of the opposition is invited to form a minority government in order to carry through a specific and strictly limited process which would be to ensure no crash-out and to prepare for a general election."​

Stewart Hosie (R), pictured with SNP leader Nicola Sturgeon, said a no-confidence vote may be the only way to prevent a no-deal Brexit. Credit: PA

Mr Hosie said if opposition MPs "are serious about the extension," then Mr Corbyn leading the way "is the only game in town".

​Mr Hosie's intervention follows talks between the opposition party leaders at Westminster aimed at preventing a no-deal break.​

Mr Corbyn said the meeting was "productive" but maintained that the priority of the opposition was preventing a no-deal Brexit, rather than a general election.

So far, they have been reluctant to go for a confidence vote fearing that under the terms of the Fixed-Term Parliaments Act Mr Johnson could, if he is defeated, delay a general election until after October 31 by which time Britain will be out of the EU.​

Mr Hosie said the plan could work if an alternative government capable of commanding a Commons majority had been "pre-agreed" before the confidence vote.​

Some MPs have suggested that a more consensual figure such a Ken Clarke or Dame Margaret Beckett could stand a better chance of winning cross-party support.

​However Mr Hosie said it was "self-evidently the case" that as the leader of the second largest party Westminster, Mr Corbyn should have the first chance of forming an administration.​

"If another name came forward that was acceptable to everybody - a Ken Clarke or Dominic Grieve type figure - then self-evidently that would be a good thing to do," he said.​

"But it is also self-evidently the case that the second largest party should have the first chance to form that administration.​

"If Jo Swinson and the Lib Dems are actually serious about their stopping Brexit position then they need to stop playing political games, get on board with everybody else."​

Liberal Democrats leader Jo Swinson is reluctant to allow Jeremy Corbyn to become interim prime minister. Credit: PA

The threat of a no-confidence vote raises the prospect that Tory MPs could be forced to abandon their party conference which opens in Manchester on Sunday.

Unusually, the Commons will be sitting while conference is taking place after MPs refused to grant the Government the customary recess in the bitter aftermath of the Supreme Court ruling that Mr Johnson's suspension of Parliament was unlawful.​

Environment Secretary Theresa Villiers confirmed that they would be on standby to return to Westminster if required.​

"All MPs will be available for votes in the House of Commons. We will be available to dash back if we are needed for commitments in Parliament," she told the Today programme.​

However there has been speculation that Mr Johnson - who has been pressing for an election - could allow the opposition parties to win a confidence vote in order to break the deadlock at Westminster.​

Whether he would be willing to do so if there was a clear plan to install an interim government led by Mr Corbyn may be another matter.