In his speech to the Conservative Party conference in Manchester, the Scottish Secretary thanked Theresa May for putting a stop to demands for indyref2 with her insistence that "now is not the time", crediting the message with the Scottish Tories' gains at the general election.
It came after the Prime Minister told activists last night that together with Scottish party leader Ruth Davidson, the Tories had "saved the Union" by sending the SNP into reverse in June.
Mr Mundell told conference delegates: "Nicola Sturgeon was determined to plunge our country into another damaging and divisive independence referendum. But faced with her unwanted demand, Theresa said simply and firmly: 'Now is not the time.'
"Without that clear decision, Scotland would be facing the prospect of an independence referendum as early as a year from now. Just imagine that.
He added: "The Prime Minister’s message was exactly what we all wanted to hear. It was the message most Scots wanted to hear. It was the message that won us 12 more seats in Scotland and secured our comeback."
Mr Mundell added that the First Minister was punished by voters for being "out of touch" with their views on a second independence referendum. And he addressed claims that the UK Government was committing a "power grab" over responsibilities returning from the EU, saying "common frameworks" in devolved areas such as agriculture to make Scotland "Brexit ready".
"We have put forward a common sense approach to leaving the EU," the Scottish Secretary said. "We know businesses and individuals need certainty and stability.
"Our laws, rules and regulations must function on the day after Brexit just as they do now.
"We will need common frameworks - just as we have now - to protect our vitally important UK internal market. But we will also add to Holyrood’s responsibilities, as decision-making powers return from Brussels.
"That’s what our approach will deliver – and I urge the Scottish Government to continue to work with us on these issues."