The SNP has given its most explicit suggestion yet that it could back a time-limited government led by Jeremy Corbyn to prevent a no-deal Brexit.
Party leader Nicola Sturgeon said she “agreed” installing the Labour leader or “someone else” after a vote of no confidence in Boris Johnson was the only” failsafe” option.
She added that leaving the EU without a deal was a “terrible” idea.
Mr Johnson has said Brexit will happen on 31 October.
The prime minister is promising this, with or without a fresh withdrawal agreement with Brussels.
Ms Sturgeon tweeted that she “agreed” with a suggestion made by journalist Sonia Sodha that the “only failsafe way is ensuring we get an extension [to Article 50, which would delay Brexit] if there’s no deal is for opposition parties to pass a vote of no confidence and install Corbyn or someone else as PM”.
Ms Sturgeon added: “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.”
The SNP’s Westminster leader, Ian Blackford, told the BBC: “We need to remove Boris Johnson from office. We need to take the keys of Number 10 away from him.
“The key issue here is extending Article 50 and having an election. Whether it’s Jeremy Corbyn or someone else – we need a candidate who can deliver on that mandate of extending Article 50 and calling an immediate election.”
Asked specifically if that meant the SNP could support Corbyn-led government he said: “We will put in Number 10 whoever can deliver an extension to Article 50 and an immediate election.
“This isn’t about a government of national unity… it’s a mechanism to extend Article 50 and deliver an election.”
SNP hints at backing short-term Corbyn government}