Scotland’s first minister, Nicola Sturgeon, has said she is open-minded about Jeremy Corbyn becoming an interim prime minister as her representative in Westminster said the Scottish National party is now “desperate” for an election.

Sturgeon said she was not personally pushing for Corbyn to lead the country as a unity figure, but he could be an interim prime minister to secure an extension to Brexit and then call a general election.

She told BBC Scotland: “We are all going to have to compromise, we are all going to have to swallow our pride and put up with something for a matter of days to allow that to happen, and get on with it.”

Play Video 1:15 Nicola Sturgeon calls on Boris Johnson to resign - video

Her interview comes as Ian Blackford, the SNP MP who leads the party in the Commons, said the party wants an election as soon as possible. Internal Labour polling has shown it could fare badly in Scotland at another election for not formally backing remain – which would be an advantage to the SNP.

Sturgeon and Blackford’s positions have sparked speculation that they might be willing to work with Labour more closely in trying to oust Boris Johnson and the Conservatives from government in the coming weeks.

Blackford has suggested the party could lend its support to a vote of no confidence in Johnson following the supreme court ruling that the prorogation of parliament was unlawful. He said it would then be the correct procedure to allow Corbyn to become interim leader.

He told the Guardian: “We want an election, we are desperate for an election. [Johnson] ought to do the right thing and resign. He should go. The indication is he’s not going to do that.

“So I would simply take the view that the opposition parties have got an obligation, that they have to remove him but we have to remove him … Let’s make sure that we do this in a dignified way, a professional way, that we remove him but he’s not going to take us out of Europe at the end of that process.”

Sturgeon signals Queen should stay out of future Scotland vote Read more

He said the SNP has to recognise that there are limits to what is “constitutionally achievable” and that parliament has to be able to demonstrate to the Queen that “mechanisms are in place to trigger an election”.

“From an administrative point of view, somebody else has to be in office to allow that to happen. Under our constitution, it is the case the official leader of the opposition has the first opportunity to be such a person.

“This is not about supporting Jeremy Corbyn as prime minister, it’s about what we need to do to get to the situation where we have an election,” he added.

The desire to remain in the EU among Scots is stronger than ever, he claimed. The country voted 62% remain in the 2016 EU referendum.

Labour recognising the SNP’s demand for another independence referendum in Scotland would be at the heart of any form of working together, he said, no matter how informal.

Another election would be a precursor to the arguments that would play out in an independence referendum, he said.