SCOTTISH Labour’s away day in an Edinburgh hotel on Friday was supposed to be a relaxing affair, but the MSPs, MPs and councillors who bothered attending must have wished they'd stayed at home.

With Kezia Dugdale quitting two days earlier, supporters of the two candidates tipped to replace her – left-winger Richard Leonard and New Labourite Anas Sarwar – had their minds on securing endorsements and printing materials.

But instead they had to listen to party number two Alex Rowley drone on about the “right-wing press” and praise Dugdale in a way he rarely did when she was leader. Others called for “unity” and appealed for colleagues across all sections of the party to come together.

However, a figure in the upper echelons of the party offered a more sceptical assessment of his organisation to this newspaper: “There are more snakes in Scottish Labour than in an Indiana Jones film.”

The away day was intended to sharpen Labour’s message ahead of a new Holyrood session, but colleagues were flat and, above all, dreading the upcoming leadership contest. And it was all down to Dugdale.

Elected in 2011 as a Lothians MSP, Dugdale was politically ambitious but never a careerist to the same extent as some of her New Labour friends. In the aftermath of the independence referendum she was already dreaming of a life outside politics.

“I don’t want to do this forever,” she said. “It’s happened to me earlier in my life than I expected it might, it could end before I expect it to and that’s OK.”

She added: “I think I could write a novel.”

Events took over and political leadership became a reality. Dugdale was elected Jim Murphy’s deputy in 2014 and, following his hilariously short spell as leader, took over from him in the following year.

However, after two turbulent years in the job, Dugdale gave up last week and opted to become a Labour backbencher.

“I am convinced that the party needs a new leader with fresh energy, drive and a new mandate,” she wrote in her resignation letter.

Speaking on condition of anonymity, Dugdale’s former backers have given their take on her troubled leadership. The prevailing view is that Dugdale is a wasted talent who, in quitting, has left her party in the lurch.

“She has bailed out,” said one.

One fanciful explanation for Dugdale’s resignation, which has been circulated by some of her more excitable backers, is that the party’s Corbynistas made her leadership so intolerable that she had no choice but to walk away.

This “hunted” theory barely stands up to any scrutiny. It is correct that Corbyn’s admirers were antagonised by her support for the failed coup against the UK Labour leader; it is also true that there have been clashes with the party’s left wing over policy strategy and emphasis.

Dugdale and her advisers believed Scottish Labour had to sharpen its anti-independence message, while the left wanted Dugdale to embrace the Corbyn agenda on social and economic policy.

Her poor relationship with Rowley, her deputy, was a symptom of her uneasy relationship with the left. Dugdale's friends believed Rowley was unsupportive and did not know what it meant to be an understudy. He felt frozen out. At a recent fundraising dinner Rowley repeatedly praised Corbyn but said little on Dugdale.

However, her awkward relations with the left were manageable. Dugdale and her fellow moderates had a majority on the governing Scottish Executive Committee. She also had overwhelming support in her Holyrood group. And she had a mandate from the members, a huge proportion of whom had backed her in the leadership contest.

Dugdale had far more control of Scottish Labour than Corbyn wielded over the UK party. The left may have sniped, but its leading figures knew they did not have the numbers to challenge her. She was safe.

The reality of Dugdale’s resignation is her heart was no longer in a job she had not been enthusiastic about taking in the first place. As an ally said: “She couldn’t be arsed any more. She put her own needs first.”

According to sources, Dugdale had considered her future in the job at various points over the last year. The most obvious trigger would have been to resign after leading her party to a humiliating third place at the Holyrood election, although allies say quitting did not cross her mind at this point.

A better time would have been to go after the council elections – where again she was humbled by the Conservatives – but Theresa May’s decision to seek her own Commons mandate meant Dugdale had to stay on and fight another campaign.

Scottish Labour feared coming fourth in the Westminster election, but unexpected gains in the election blocked an immediate departure for her. Summer trips to Greece and New Zealand focused her mind on an escape plan.

Although the left had political differences with Dugdale, the party figures most disappointed with elements of her leadership were the moderates who supported her in the leadership contest and beyond.

Senior individuals on the right suspected she was softer on independence than they were and believed Unionist voters were unimpressed with her on the constitution.

In their minds, the defining moment of Dugdale’s leadership was the catastrophic interview she gave with the Fabian Society ahead of the last Holyrood election, during which she said it was not “inconceivable” she could back independence.

“That interview set us back a year,” one senior party figure said. “It was hugely damaging,” said a former SEC member. “We were always playing catch up after that.”

Others believed she balked at taking tough, but necessary, internal decisions, such as ensuring time-serving MSPs were replaced by better candidates.

However, if Dugdale’s ragged spell as leader underwhelmed her natural allies, her shock resignation led to the same folk feeling angry and hurt. Three party figures – all of whom supported her leadership – described her decision as “selfish”.

On the eve of a new Holyrood session, when opposition parties should be limbering up to scrutinise the Government, Dugdale chose to walk away and plunge the party into weeks of internal strife. By quitting she has given the Corbynistas the chance of unified leadership north and south of the border. “I am furious with her,” said one her loyalists.

Dugdale was never known as a great internal party communicator, but her chosen method of announcing her resignation to Labour MSPs – a Whatsapp message late on Tuesday night – left colleagues shaking their heads. One MSP said: “It was a shitty way to do it.”

Alan Roden, a reporter from the Daily Mail who left his job to become Dugdale’s spin doctor, was told about the resignation when he was in a casino in Las Vegas. It is understood that Roden, along with strategy chief Martin McCluskey and policy director Gina Davidson, had their employment contracts tied to the leader.

Dugdale’s allies had noticed a subtle change in her recently. She had “gone into herself”, one said, and did not seem to have the same appetite for the job. The Westminster campaign had given her a boost, but something was amiss. Even so, nobody expected her to quit.

Her gradual drift towards the exit door is also likely to have been influenced by a change in personal circumstances, namely her romance with SNP MSP Jenny Gilruth.

Dugdale first got to know Gilruth on a US State Department trip in the summer of 2016, after which the Scottish Labour leader and her then fiancee Louise Riddell became friends with the MSP.

The three women, as well as the son of a former SNP MSP, went on holiday over the New Year period to Fuerteventura in the Canary Islands, but Riddell and Dugdale had a row on the trip and the leader’s fiancee got a flight back to the UK on her own. Their relationship was over.

In July, a newspaper reported that Dugdale and Gilruth were now an item and had been dating since March. The love story generated reams of positive publicity, but some of Dugdale’s colleagues worried about the political ramifications of a cross-party love affair.

“Can you credibly lead Scottish Labour when you are in a relationship with a SNP MSP? I don’t think so,” said one sceptic.

Another party figure said: “When I read about it, I thought her time as leader would be limited. Love is blind, but it was always unworkable from a political point of view.”

A third moderate said of Dugdale’s leadership more generally: “In the summer, it seemed like she was more interested in her Instagram account than leading the party.”

Dugdale’s friends will attempt to spin her a legacy, but pinpointing genuine achievements will be challenging. Running to the left of the SNP at the last Holyrood election? Labour came third. Securing a place on Labour’s National Executive Committee? Small beer. Embracing federalism? Nobody cares.

If politics is about winning elections Dugdale proved to be a whopping great loser. Voters preferred Ruth Davidson three times at the polls and the Lothians MSP only made gains at Westminster by clinging to the coat-tails of a UK politician she had tried to bring down. By any fair electoral measure, Dugdale is the most unsuccessful Scottish Labour leader of all time.

Her real legacy, say her former allies, is to have triggered an unwanted leadership contest at a time when stability was required. Dugdale now has more time on her hands to write that novel, but a fresh chapter in Scottish Labour’s decade-long misery memoir is about to be written in full public view.