Nicola Sturgeon has hinted at SNP support for Jeremy Corbyn becoming a caretaker prime minister, in a bid to secure an extension to the Brexit deadline.

The First Minister tweeted on Friday that she agrees with the idea of installing the Labour leader as PM through a vote of no confidence in the Conservative administration so he can secure a Brexit extension, before then calling an immediate general election.

Despite the support from the SNP, a vote of no confidence in the UK Government would still need to win over the other opposition parties, and the 23 MPs expelled by the Tories. The Liberal Democrats have said "the numbers don't add up" for Mr Corbyn to take over as prime minister.

In response to a tweet making the suggestion, Ms Sturgeon said: "Agree with this. VONC [vote of no confidence], opposition unites around someone for sole purpose of securing an extension, and then immediate general election.

"Nothing is risk free but leaving Johnson in post to force through no deal - or even a bad deal - seems like a terrible idea to me."

She later added: "The point I'm making is not really about who it should be - I'm open minded on that - more that the opposition needs to unite behind a plan and act."

Mr Johnson has maintained Britain will leave the EU on October 31, with or without a deal.

The Benn Act, passed in Westminster earlier this month, instructs the PM to request an extension to the deadline until the end of January if no deal is agreed, but that is something Mr Johnson has repeatedly said he will not do.

A spokesman for the SNP said: "The SNP has led the way in ensuring Brexit can be stopped and in bringing Parliament back into action after the Tories sought to shut down UK democracy, and we will continue to work with all opposition MPs to stop a no-deal Brexit and call a general election to remove this dangerous and undemocratic Prime Minister as soon as possible.

"It is now possible - if the political will is there - that parties could come together to ensure that the letter to secure an extension is not left in the hands of Boris Johnson and his cronies, who are determined to find a way to get around the Benn Act, but is instead sent by a temporary caretaker prime minister, who would be in office only as long as is necessary to send the letter, with an election held immediately afterwards.

"We remain open to all options to achieve the aim of stopping a no-deal Brexit and getting rid of Boris Johnson."

Kirstene Hair, Conservative MP for Angus, said: "This confirms what many have long suspected - SNP MPs will happily prop up Jeremy Corbyn in Number 10.

"There is no doubt that Corbyn's weak stance on indyref2 is a deciding factor for the nationalists.

"He has already left the door open for a re-run of the 2014 referendum if he becomes prime minister.

"Only a Conservative government will stand up for those who voted No in what was meant to be a once-in-a-generation event."