Image copyright PA Image caption Nicola Sturgeon believes the case for Scottish independence is stronger than ever

Theresa May's pledge to stand down if her Brexit deal is approved risks making "an already bad project even worse", Nicola Sturgeon has claimed.

Ms Sturgeon said it could see Scotland "shackled to a disastrous Brexit driven by a Tory party lurching even further to the right".

She predicted that this would "further reinforce" the case for independence.

Ms Sturgeon was speaking after Holyrood voted for Brexit to be cancelled if the UK faces leaving the EU without a deal.

Later MPs at Westminster voted on a series of eight alternative Brexit options and rejected them all.

It led to SNP Westminster leader Ian Blackford raising the prospect of an election amid what he described as a "mess" and a "shambles".

"Parliamentary democracy as we know it has broken down," he told the BBC.

"I would really appeal to people, appeal to parliamentarians, given where we are, we haven't been able to resolve this. I think the right thing to do is we need to come together and recognise we put this back to the people.

"If that doesn't happen then the only other option we've got is a general election."

But Labour MP Ian Murray criticised the SNP for abstaining during a vote on whether there should be a customs union with the EU. The proposal would have passed if SNP MPs had voted for it.

Mr Murray said: "Nationalist MPs sat on their hands rather than deliver a parliamentary majority for a minimum of a permanent customs union to be written into law to protect the British economy and jobs - making a mockery of Nicola Sturgeon's pledge to support a 'common sense solution'.

"It's clear that the SNP cares more about constitutional chaos, indyref2 and grievance than finding a solution to Brexit, in the desperate hope of boosting support for the break-up of the UK."

Meanwhile, two SNP MPs - Angus MacNeil and Pete Wishart - abstained in a vote on whether there should be another EU referendum. The rest of the party's MPs voted in favour of the proposal.

Image copyright Reuters Image caption SNP Westminster leader Ian Blackford called for a general election

The prime minister told about 300 Conservative backbenchers on Wednesday afternoon that she was "prepared to leave this job earlier than I intended in order to do what is right for our country and our party".

She said she knew that Conservative MPs did not want her to lead the next phase of Brexit negotiations "and I won't stand in the way of that" - but did not name a departure date.

The PM wants to bring her deal back to the Commons this week. It has been rejected twice before by large margins.

Commons Speaker John Bercow ruled last week that the government could not return for a third attempt, unless there had been "substantial" changes to the proposals.

In a statement released after the prime minister's announcement, Ms Sturgeon said it did not change the fact that Mrs May's EU withdrawal deal was a "profoundly bad one".

The first minister added: "If Brexit ends up being forced through on the basis of a deal that no one supports - indeed a deal so bad that the PM has to promise to resign to get it through - it will make an already bad project even worse.

"For Scotland, this raises the prospect of being shackled to a disastrous Brexit driven by a Tory party lurching even further to the right, with a Brexiteer PM in charge - further reinforcing the case for our country taking its future into its own hands."

Mrs May's cabinet colleague, the Scottish Secretary David Mundell, paid tribute to the prime minster.

"She's determined to deliver our exit from the EU, an orderly exit on the basis of an agreement," he said. "But she recognises that new leadership is required to take forward the next stage of the process."

Image copyright PA Image caption Theresa May hopes pledging to stand down will increase the chances of MPs backing her Brexit deal

Earlier, the Scottish Parliament voted by 89 to 28 for a motion calling for Article 50 to be revoked as a last resort, if it is the only alternative to a no-deal Brexit.

The motion was originally lodged by the Greens and was backed by the SNP and Labour, who both added their own amendments to it.

The result was largely symbolic, but increased the pressure on the UK government.

Mrs May has previously ruled out revoking Article 50, which she said would be a "failure of democracy".

More than five million people across the UK have signed a petition calling for Brexit to be cancelled, with an estimated million protesters marching through London on Sunday to call for another referendum - a so-called People's Vote.

Opinion polls have suggested that a narrow majority of people are now in favour of remaining in the EU, according to analysis by polling expert Prof Sir John Curtice.

Image copyright PA Image caption Patrick Harvie said people across the UK were now "waking up to the crisis before us"

The original Green motion at Holyrood said that Article 50 should be revoked "immediately" if the process is not extended long enough for a new referendum to be held.

However, this was amended by Labour to instead say Brexit should be cancelled if the UK is "faced with a choice of no deal or revoke".

The SNP also added its own amendment calling on the UK government to "stop ignoring the views of this parliament and the overwhelming majority of people in Scotland".

Scottish Greens co-convenor Patrick Harvie said the Scottish Parliament had "repeatedly sought compromise" over Brexit, but claimed the prime minister had "failed to listen at every stage".

He added: "The UK government is in shambles. The prime minister must seek a longer extension in order to put the question back to the people. If she is unwilling to countenance this, the only option remaining is to revoke Article 50 unilaterally."

A cross party group of politicians including Green MSPs Andy Wightman and Ross Greer won a case in the European Court last year which ruled that the UK could unilaterally withdraw its Article 50 notification at any time prior to its exit from the EU.

Meanwhile, an SNP MEP has urged the EU to "leave the light on for Scotland" as he made what could be his last ever speech in the European Parliament.

Alyn Smith insisted that Scotland was a "European nation" - and added that independence would offer the country a "route back".

Downing Street said last week that Mrs May "has said many times she will not countenance revoking Article 50", and that she has "long been clear that failing to deliver on the referendum result would be a failure of democracy and a failure she wouldn't countenance".