The Scottish First Minister made clear that a referendum next year would be a condition of support for a minority Labour government led by Jeremy Corbyn after the 12 December election, though she said she could not see the SNP entering a formal coalition.
Launching the SNP election campaign in Edinburgh, Ms Sturgeon said there were no circumstances in which she would prop up a minority Boris Johnson government at Westminster.
“I would never support a Conservative government,” she said. “I can’t foresee the SNP being in a formal coalition.”
But she said that in a hung parliament, the SNP would seek to “form alliances” to lock the Tories out of power and stop Brexit.
And she said she would use the leverage the SNP may have in a hung parliament to push Mr Corbyn to allow an early independence referendum, who has said he does not want a re-run of the 2014 poll in the “formative” years of his administration.
The SNP is hopeful of making significant additions to its tally of 35 MPs from the 2017 election, with the Scottish Conservatives thought to be vulnerable following the resignation of leader Ruth Davidson.
Ms Sturgeon said: “The reality is that any minority Labour government that wanted to deliver any of its policies and sustain itself in government would need the support of the SNP.
“It gives the SNP – and by extension Scotland – significant influence and significant power.”
Ms Sturgeon said recent comments by Mr Corbyn made clear that Labour was “heading in the right direction” on an independence referendum.
But when shadow cabinet minister Sir Keir Starmer was asked if he could rule out Labour support for an independence referendum in 2020, he told Sky News: “Yes. We are not doing deals.”
Ms Sturgeon then accused the prime minister of taking a “contemptuous” attitude towards the people of Scotland.
“My intention is that the people of Scotland decide Scotland’s future in an independence referendum next year,” she said.
“The SNP already has a cast-iron mandate for an independence referendum, based on our explicit manifesto pledge for the 2016 Holyrood election.
“So if the SNP wins this election in Scotland, the question should not be to me or to the SNP – what will you do if Westminster refuses?
“The question must be to Boris Johnson and to Westminster – what gives you the right to block the democratic wishes of the people of Scotland?
“That is an undemocratic, untenable and unsustainable position.”
Ms Sturgeon said a vote for the SNP was “a vote to escape Brexit” and “a vote to put Scotland’s future firmly in Scotland’s hands”.
SNP MPs would back any efforts to bring about a second EU referendum and would vote to revoke Brexit if the alternative was a no-deal crash-out, she said.
“We will not give up trying to stop Brexit for the whole of the UK,” said Ms Sturgeon. “I think the positions of the other parties make Brexit look ever more inevitable, but other parties are deeply split and we will see what the arithmetic is in the House of Commons after the election.
“We will look to form alliances and build majorities in the House of Commons to stop Brexit.”
Ms Sturgeon said the SNP will bring forward legislation to protect the NHS from a potential trade deal with US president Donald Trump if Brexit goes ahead.
“We will fight tooth and nail any attempt to expose the National Health Service to a post-Brexit trade deal with Donald Trump,” she promised.
“That’s why after the election, SNP MPs will bring forward a new law – an NHS protection Bill – to explicitly protect the NHS in all four countries of the UK from becoming a bargaining chip in future trade deals.
“It would prevent companies from taking legal action through investment protection or investor-state dispute resolution mechanisms.
“It would ensure that confidential discounts for expensive medicines would not be at risk.
“And it would stipulate that, before any trade deal could come into force, the Scottish parliament and the other devolved legislatures would need to give their explicit content.”