Nicola Sturgeon has insisted MPs need to get their act together and form an alliance to stop a no-deal Brexit

The First Minister has said the SNP would be prepared to install Jeremy Corbyn in Downing Street to avoid crashing out of the EU without an agreement.

She labelled Scottish Liberal Democrat leader Jo Swinson "daft" for ruling this option out. 

Ms Sturgeon made the comments during an on-stage interview with the journalist Graham Spiers during the Edinburgh Festival Fringe. 

She said installing Mr Corbyn in Number 10 temporarily is "one way of potentially avoiding a no-deal Brexit" – but not the only way.

She said: "We've been trying to work across parties, work with anybody and everybody in Westminster to try to put a coalition, a majority of the Commons together, preferably to stop Brexit altogether but absolutely to stop a no-deal Brexit. 

"There are different ways that that can be achieved. What Jeremy Corbyn has said today is be no means the only option, which for people who haven't heard it – he's suggesting a vote of no confidence and then if the opposition win that, he would become a very short-term caretaker Prime Minister, call a general election, but as Prime Minister seek an extension to Article 50.

"That is one way of potentially avoiding a no-deal Brexit. It's not the only one. 

"My view is that the consequences and implications of a no-deal Brexit are so severe that we should be exploring all options and we shouldn't be ruling anything out."

She added: "I'll take any option that is deliverable that will stop a no-deal Brexit. 

"The other option is MPs could take control of the business in the House of Commons and the timetable for business and try to pass some kind of primary legislation blocking a no-deal.

"People who understand House of Commons procedure better than I do are no doubt beavering away looking at other options. 

"My point is – Jo Swinson of the Liberals has said, 'Oh no, I wouldn't back the Jeremy Corbyn option'. 

"I think that's daft, frankly, for somebody who professes to be so against Brexit."

Ms Sturgeon said the House of Commons can "of course" find a way to block Brexit if it gets its act together. 

She added: "The big question – and the big question mark – is can it get its act together.

"People keep saying there's a majority in the House of Commons against no-deal. 

"I think that is true, from everything I can gather. What is less certain is whether that majority can get its act together, come together and agree an action plan. And time is running out."

She continued: "If you look back across most of this year actually, there would be plenty of reasons to be pessimistic about that majority being able to come together in a way that actually makes something happen. 

"Have I given up hope? I'm going to keep trying and the SNP are going to keep trying and it's definitely possible to do it, if we get people who put party politics aside for a moment and try to do it in the greater good."

Earlier, she said: "On the Brexit side of this, we've got folk, including folk in Government, who are prepared to contemplate options like shutting down parliament to drive through what they want to do. 

"That's the level of obsession and I guess discipline that we're seeing on that side. 

"So on the Remain, anti-no-deal Brexit side, we should be looking at all options. 

"And I'm not prepared to rule out anything before we've had the opportunity to explore it."

The First Minister insisted the SNP and Labour are not "working away doing a deal" when it comes to any future general election. 

But she said there is a "more immediate challenge here about whether we can put together some kind of alliance to stop a no-deal Brexit". 

And she repeated her insistence that the SNP would look to be part of any "progressive alternative to a Tory Government" in future.

She added: "I can't envisage a formal coalition between the SNP and Labour, but I would always try to work to put together an alternative to a Tory Government."

Critics have flagged up the possibility of a post-election pact between Labour and the SNP after shadow chancellor John McDonnell said a Labour Government would not block a second independence referendum.

Mr Corbyn has also backed this stance, which flies in the face of Scottish Labour policy.

Elsewhere, Ms Sturgeon said the "urgency" of Scottish independence would grow under a no-deal scenario, which she said would be "horrific" for lots of people. 

But she added: "Just because a no-deal Brexit, I think, will make independence more likely, doesn't mean I secretly support a no-deal Brexit. 

"It is possible to think more than one thing at the same time – if you're a woman."