Three months ago, Jim Murphy stepped off his Irn-Bru crates after making the case for a No vote in the independence referendum to a group of hecklers, supporters, and bored onlookers on Airdrie high street.
One of the few London-based Labour figures taking an active role in the campaign, he was considered mad for schlepping around Scotland on a soapbox made from girders. The mentality in the Westminster Labour party appeared to be that Yes had absolutely no chance of winning, so why bother trying?
Rumours circulated that he was placing himself in the running to be the next leader of Scottish Labour. But back then it was considered unlikely that a leading Scottish figure in the Labour party who had served as a Westminster cabinet minister under Gordon Brown would sacrifice all that for Holyrood, where Labour politicians were usually drawn from the reserves.
At the time, Murphy insisted he had no plans to take over. Either way, few thought he'd be needed.
Months later, after the beleaguered Johann Lamont quit as Scottish Labour leader in a strop after being repeatedly undermined by "dinosaurs" in Westminster, Murphy is odds-on to take over the reins when the results of the Scottish Labour leadership election are announced this Saturday.
But the party he would inherit is a very different beast to the one that once dominated Scottish politics. It still holds 41 of the country's 59 Westminster seats but just 14,000 members, against almost 100,000 for the SNP. Whoever wins the leadership election will start off on the back foot.
Murphy, the establishment candidate, hasn't had the toughest of challenges. His opponents are the left-wing, trade-union-backed MSP Neil Findlay and the relatively unknown MSP Sarah Boyack, whose campaign highlight may have come when she revealed in The Guardian's online hustings that her favourite soft drink is "water".
Murphy's team is largely made up of figures from the Better Together campaign, such as campaign director Blair McDougall. This has done nothing to quell speculation among long-serving Scottish Labour members that he had one eye on taking control of the Holyrood operation when he decided to spend the summer touring Scotland in support of the union. Why else would you spent 100 days being pelted with eggs and screams of "Quisling bastard!" from Yes voters?
Individuals within Murphy's campaign have been confident of victory ever since he confirmed that he would stand for leader in October. It has never been in doubt that Murphy, an experienced campaigner and policymaker, would win the support of the majority of Scottish Labour MPs and MSPs, who, after one shocking poll claimed they could soon be left with just four seats after May's general election, are terrified over the prospect of electoral catastrophe.
Murphy is seen within both Holyrood and Westminster as the man who can provide the most effective damage limitation against Nicola Sturgeon's SNP, whose support has been undergoing some kind of political mitosis ever since the referendum.
On its own, backing from MPs and MSPs isn't enough to secure victory under Scottish Labour's electoral-college voting system, which splits votes into three equally weighted groups: elected members, trade union members, and individual Scottish Labour members.
But, with just 81 Scottish Labour parliamentarians and 14,000 members, one vote from an MSP is worth around 170 times one from an ordinary member.
"In a sense, the election has been stacked towards Jim," complained one Labour insider. "If you look at the Labour party, the votes are loaded towards MPs and MSPs whose votes are worth hundreds of Labour party members and thousands of trade union votes."
There is also anger within Scottish Labour about a late rule change removing the secret ballot of MPs and MSPs. This means that if any of them are tempted to vote for one of Murphy's opponents, he'll know about it, and being seen to vote against the probable winner isn't the wisest of career choices. "Jim doesn't have a reputation as the most forgiving of people, does he?" said one Scottish Labour aide.
Moreover, a booklet sent out with the leadership ballot papers only provided information about what parliamentary backing each candidate had received, ignoring support of trade unions and other affiliates, and making Murphy seem like the most popular candidate by far. Murphy's opponents were said to be "deeply frustrated" by the move.
But, despite all of this, there is still a chance (a small chance) that Murphy won't win on Saturday. In fact, Findlay's team seem remarkably confident for a campaign backing a candidate with odds of 7/2. Why? Because of the trade union vote. "A lot of people expected a coronation – we think it will be photo finish," said a member of Findlay's campaign team.
They think they've hoovered up over two-thirds of the vote in the trade-union block of the electoral college, which might be just enough to cancel out Murphy's advantage in the parliamentary block. The race is closer than people think, Findlay's team say, and Murphy is getting worried.
Some of Findlay's supporters believe Murphy has been chopping and changing his strategy throughout the campaign, taking some of Findlay's policies as it became apparent he was facing more of a challenge than originally expected.
There has also been speculation that the late intervention of shadow Scottish secretary Margaret Curran, who had previously promised to stay out of the debate only to back Murphy at the 11th hour, proves the election is on a knife-edge and that Murphy is canvassing for all the help he can get.
With the union votes apparently in the bag for Findlay, and Murphy the most popular among the elected members, this vote may well come down to who wins the votes among individual members, and Findlay's campaign is confident after having used 1,000 volunteers from the trade unions to phone all the paid-up members of Scottish Labour. Every single one of them.
"It's obvious Jim has a great deal of support amongst his parliamentary colleagues, although we believe Neil has been making ground there as the campaign has progressed," said a member of Findlay's campaign team. "We are confident of a strong vote in the [trade union] section and we believe our strong grassroots campaign has mobilised a good vote amongst individual party members. It'll be closer than the referendum result."
As the voting period draws to a close, one senior Labour parliamentarian said: "As a Jim supporter, the result is going to be closer than I'd like. I still think Jim will win it, but Neil's campaign has been really, really good."
However, the parliamentarian thinks one of Findlay's many phone canvassers revealed the picture might not be quite as rosy as his team claim: "I was phoned on behalf of Neil and I said 'I've already voted for Jim.' She asked why, and I said I want to win the next election, and she said 'Yeah, that's what a lot of people have been saying.'"
Jamie Ross is a Scotland reporter for BuzzFeed News and is based in Edinburgh.
Contact Jamie Ross at email@example.com.
Got a confidential tip? Submit it here.