IT was heartbreak for Ed Miliband and his team on Friday morning, but for Scottish Labour leader Jim Murphy it was more like a nightmare.

Although Miliband failed to topple David Cameron, Murphy had presided over his party's worst election result since 1918.

Scottish Labour, the country's dominant political force for more than half a century, had lost 39 of its 40 seats to the SNP, including in Murphy's East Renfrewshire constituency. Some of Murphy's supporters were quick to absolve him of blame for the terrible state of his party.

Since 1999, they said Scottish Labour had failed to adapt to devolution, elected a succession of bad leaders, selected dud candidates, produced shoddy manifestos and watched as the party's MPs treated MSPs like second-class citizens.

The lessons from Labour's defeats at the hands of the SNP at the last two Holyrood elections were also ignored and the referendum, which saw the party haemorrhage votes to the SNP, accelerated the decline.

However, other party insiders - candidates, elected representatives and activists - say the new leader made the toxic legacy he inherited worse, not better. "He snatched catastrophe from the jaws of defeat," said one.

Murphy, who has never been on the intellectual wing of his party, has always been regarded internally as a talented self-publicist who was adept at advancing his own interests.

One colleague, explaining Murphy's approach to the media, said: "He once told me he was not bothered about the words in newspapers, just the pictures, and how he looked on TV."

During the campaign, some of Murphy's supporters were taken aback by his obsession with how he looked in the tabloids: how big the photograph was; and whether he came across better than Nicola Sturgeon. He was said to have been driven mad by the exposure given to Sturgeon - particularly after the first leaders' debate involving Miliband and David Cameron - and was grumpy when a daft photo of him emerged in the media.

One senior party figure said he didn't know if Murphy was campaigning for office, or for "the front page of Vogue". Members of Murphy's team admired his energy, but were bemused by his vanity. They were irked by his bad habit of pulling stupid faces in photo-shoots and grew weary of his incessant football references. He stopped dying his hair, but only reluctantly.

The flip-flop campaign strategy was believed to be another reflection of Murphy's shallowness.

During last year's leadership contest - where he succeeded Johann Lamont by seeing off MSPs Sarah Boyack and Neil Findlay - Murphy had struck a predictable New Labour pose, backing a fairer distribution of a bigger tax base and calling for a partnership between workers and businesses.

After the leadership contest, he ditched his Blairite clothes and reinvented himself as a small-N nationalist who was committed to reaching Yes voters. His party's constitution was changed to include the word "patriotism", he flattered 190,000 Labour-friendly Yessers by describing them as the "most important" voters in the UK, and "Yes for Labour" was devised as the campaign slogan.

However, doubts soon crept in about the wisdom of the strategy. Feedback revealed that people did not like to be pigeon-holed as Yes or No voters; more damagingly, those who had backed independence did not like Murphy.

Labour sources at Holyrood were also astonished at Murphy becoming the poster boy for autonomy for the Scottish party: as Secretary of State for Scotland in Gordon Brown's government, he was said to have interfered in ex-leader Iain Gray's speeches and tried to change the content. And when the party's interim devolution commission produced a blueprint of more powers for the Scottish Parliament, Murphy was dead against giving Holyrood control of income tax. "He was the MPs' champion," said one insider.

As the polls showed the SNP lead increasing rather than narrowing, Murphy replaced Yes for Labour with the sort of left-wing campaign he had derided for most of his political life. He backed tax rises on the wealthy, became a champion of the "working class" and campaigned outside a business that used zero-hours contracts. It was as if Findlay had won in December.

One ally said: "He was even less convincing as a left-winger than a Nat." In a final U-turn, the last days of the campaign were marked by an attack on a second referendum, an approach some colleagues felt should have been adopted from the start. In four months, he had gone from Nat-lite to full-fat Unionist.

A Labour insider said Murphy's strategy did not lack effort, just credibility. "He never sees anything through. Some folk just see him as insincere."

Murphy's handpicked team - effectively a Better Together reunion - also attracted criticism. Many of the faces who worked on the pro-UK body, which was described as a "pop-up political campaign" for Murphy, eased seamlessly into their new roles.

However, like many sequels, Better Together 2 was a pale imitation of the original. Murphy's key lieutenants - chief of staff John McTernan and strategy head Blair McDougall - were an awkward fit, while a source said three words commonly associated with McDougall were: "Where is he?"

Meanwhile, McTernan appeared to revel in his status as Murphy's top dog. Under Johann Lamont, the then general secretary Ian Price had occupied the sole private office in the party's Bath Street headquarters. With Murphy in charge, McTernan got the office, while new general secretary Brian Roy used a desk in the open-plan area.

McTernan was also unpopular among some colleagues at Holyrood and acquired a reputation for making bold statements that were rarely borne out by reality. It was said he claimed that Sturgeon would struggle in the first UK leaders' debate, and announced that an event by Gordon Brown in Margaret Curran's constituency would have a big effect on the campaign. In the end, Sturgeon shone in London and the Brown press conference sank without trace. One source said McTernan had two modes: nice guy or wannabe Malcolm Tucker.

As the polls refused to budge, other grievances developed. Deputy leader Kezia Dugdale was said to have been under-used, as was senior MSP James Kelly, and Murphy's shadow cabinet was deemed to be a paper-body subordinate to his well-paid helpers.

Against a backdrop of political extinction, senior figures still managed to find time to indulge in petty backbiting. Jenny Marra, who had been co-chair of Murphy's leadership campaign team, employed ex-Lamont spin doctor Craig Davidson to help in her office.

One insider said the bad mouthing of Marra for a routine hiring decision, by people who should have been campaigning, showed Labour's malaise: "It was symbolic of Scottish Labour - a pathetic bitching row about personality, not policy or strategy."

Labour also suffered from tension between candidates in the scramble for scarce election cash. In most campaigns, Scottish political parties prioritise a handful of constituencies; this time, Labour was faced with protecting all of its seats.

Roy, to his credit, produced an incentives-based plan that rewarded effort with resources. If a Constituency Labour Party (CLP) met voter contact rates, extra leaflets would follow.

According to documents seen by this newspaper, the Roy plan flushed out the grafters from the slackers. In early February, East Lothian CLP had made 1,547 voter contacts. Other CLPs were in single digits.

Some seats naturally fell off the radar at Labour headquarters, but in the latter stages of the campaign insiders believed favouritism trumped effort as resources were diverted to the established "sons and daughters" - code for Jim Murphy, Douglas Alexander and Margaret Curran, the latter of whom was believed to be an undeserving resource-hogger.

On election night, party insiders hoped to save half a dozen MPs, but when the boxes opened the list was whittled down to Murphy and Edinburgh South candidate Ian Murray. As the votes were counted, Murphy fell off the list and Murray became the last man standing. "It went from Get Out The Vote, to get out the revolver," one source said.

Scottish Labour now faces a bout of internal soul-searching about its purpose and survival. According to several candidates, a recurring theme on the doorsteps was discovering little sympathy for the party among the 20-40 age group.

Female voters, a key demographic for Labour and the No campaign, have also migrated to the SNP, particularly since Sturgeon took over. And, in the call centre used by the party, it was said to be striking how many people hung up after they heard the staff were working on behalf of Scottish Labour.

One candidate said he feared Scottish Labour was becoming like the Tories north of the Border: a tribe backed by a dwindling, ageing core vote, marked by loyalty rather than enthusiasm.

The leadership is expected to back the sweeping internal changes, but a key question will be whether Murphy remaining as leader is a barrier to progress. The former MP was said to be a vote-loser on the doorsteps and that a big chunk of the electorate, for whatever reason, refuses to give him a hearing.

Even Murphy's allies concede that his efforts in Better Together make it hard for him to become the Labour figure who will bring angry Yes voters back into the fold.

As Murphy examines the wreckage of a party that had dominated politics for decades, a party member summed up his plight by comparing him to a former Rangers manager who departed quickly after finding it hard to make connections with the Ibrox club's players or fans.

"In Labour circles, he is known as the party's Paul Le Guen," he said. "He has big ideas, and a big reputation, but it turns out he doesn't understand Scottish politics and can't get anyone to play for him."