The First Minister reportedly confided in John Swinney and told the former SNP leader to prepare to replace her as she waited for the conclusion of the report into her conduct by James Hamilton.
Ms Sturgeon is said to have been preparing Mr Swinney in the days between the leaking of the conclusions of the harassment complaints inquiry by the Scottish Parliament, and the day Mr Hamilton’s report was due to be published.
She had decided that if she was heavily criticised or found to have broken the rules, she would resign as First Minister ahead of the election, a move that would have brought chaos to an already fractious SNP.
The book states: “During that period of limbo, Sturgeon was taking counsel with her closest allies. These included Swinney, whom she told to “be ready” for what might come at the start of the week.
"In effect, she was preparing him to step up and take over as leader of the government and try to reunite a fractured SNP just weeks before a crucial Holyrood election.
"Her popularity had soared back to levels not seen since the 2015 election campaign as the public showed their approval of her daily coronavirus press briefings, but it was Sturgeon’s view that the office of first minister was more important than her personal survival, and she would have resigned if Hamilton had been overtly critical or found that she had broken the rules.”
The book adds that several senior SNP figures were considering putting their names forward, including finance secretary Kate Forbes, then justice secretary Humza Yousaf, and Westminster leader Ian Blackford.
However, Mr Hamilton’s report cleared the First Minister of wrongdoing, stating that she had not misled Holyrood around the issue.
This report, rather than the parliamentary inquiry which concluded she had misled parliament, was the key to her ongoing survival.