JOHANN Lamont blames one person above all others for her decision to resign as Scottish Labour leader:

her best friend, MP Margaret Curran. The pair have known each other since freshers' week at university, fought the same battles for gender equality, entered Holyrood together, and acted as each other's confidantes.

But Lamont and her allies believe Curran - who is Ed Miliband's shadow Scotland secretary - knifed Lamont in the back when the Glasgow Pollok MSP needed help.

Lamont wanted Scottish Labour general secretary Ian Price to stay in his post, but Curran disagreed and was happy to see him removed by UK Labour earlier this month.

Lamont was also told recently that Curran had been briefing against her - an act she considered a personal betrayal.

When Lamont agreed to resign on Friday, her inner circle at Labour's Bath Street headquarters in Glasgow included spin doctors Paul Sinclair and Craig Davidson, business manager Paul Martin and deputy leader Anas Sarwar. But Curran, a friend for more than 30 years, was pointedly not invited.

"She was told about it last," one Lamont ally said. "Johann is very hurt by Margaret's behaviour. She believes Margaret only cares about holding on to her job in Ed's shadow cabinet."

A second insider said Curran did Miliband's dirty work in the early days of Lamont's leadership: "Margaret told Johann that she couldn't talk about the bedroom tax until Ed had made up his mind on the subject."

But a source close to Curran hit back, saying: "Margaret and Johann had frank discussions from time to time, but Margaret does not go behind people's backs. The accusations are just very strange. The specific accusation that Margaret briefed members of the Scottish executive committee is a lie."

Other than Curran, Lamont also blames the Westminster "dinosaurs" for not recognising that the independence referendum has changed Scotland. By "dinosaurs", she means a significant portion of Scottish Labour MPs.

And that pointed to the bigger issue: beyond a broken friendship is the fundamental problem that has dogged Scottish Labour since 1999 - who truly leads the party north of the Border?

Lamont's bitter complaint - that UK Labour removed Price unilaterally, a comment made in an "exit interview" with the Daily Record - was reminiscent of issues faced by her predecessors.

In 2000, the then Labour first minister Henry McLeish was undermined by his Westminster colleagues after he backed free personal care for the elderly.

Seven years later, Jack McConnell was a bit part in his own re-election campaign after Blairites and Brownites fought for control of Labour's bid to stay in power at Holyrood.

And in 2008, Wendy Alexander was famously hung out to dry by Gordon Brown after she tried to put her party on the constitutional front foot by backing an independence referendum.

However, Lamont's leadership, which started in late 2011, was supposed to be different.

McLeish, McConnell, Alexander and Iain Gray were merely Labour group leaders at Holyrood, but Lamont was the first to be leader of the entire Scottish party.

Her ill-fated three years in charge can partly be explained, one insider said, by her gradual realisation that she was Scottish leader "in theory, not practice".

For instance, officials in the party's Scottish headquarters are UK Labour employees and can - as was seen with the Price row - be removed by the London machine. And Scottish Labour MPs, although nominally under Lamont's control, had little respect for the MSP and resisted her pulling rank.

The devolution commission, set up by Lamont to examine further powers for the Scottish Parliament, was an early warning sign.

An interim report concluded that the party was "minded" to devolve all income tax to Holyrood, a proposal that angered many MPs.

The impasse resulted in Lamont travelling to London to present her case to Miliband's shadow cabinet and a truculent group of Scottish MPs. One senior source said that there was "extreme scepticism" towards the income tax proposal and it was dumped, to be replaced by a weaker initiative believed to be unworkable.

Last year's Falkirk selection debacle was another eye-opener for Lamont.

When trade union Unite tried to manipulate the Westminster selection contest by recruiting more than 100 new members to the local party, Lamont had no constitutional power to intervene. Although she was Scottish Labour leader, her party's inscrutable internal structures meant that responsibility for MP selections rested in London.

The referendum campaign also taught Lamont a harsh lesson in the politics of sharp elbows. She was supposed to be top of the Labour pyramid in the campaign, but in the end was eclipsed by Brown, Alistair Darling, Jim Murphy and Douglas Alexander, all of whom pushed her out of the way.

Her allies were also incensed by what they believed was Better Together's shameless promotion of Murphy, who was being tipped in the media by anonymous sources as a possible successor.

In the words of one source: "She [Lamont] was f***ing invisible."

The MPs had two proxy targets for attacking Lamont: Price and Sinclair. Price, who had been Lamont's hand-picked choice as the party's general secretary, was deemed to be weak and out of his depth. And Sinclair - who used to work for Brown - was considered to be a fractious character who could pick a fight in an empty room. Both men were briefed against by MPs.

Aside from the growing tensions between Curran and Lamont, other key relationships inside Scottish Labour were said to be poor.

Sarwar and Curran grew to dislike each other - a classic turf war based on both politicians wanting to be Scotland's loudest voice at Westminster.

A Labour insider said Curran resented Sarwar's "sense of entitlement", as well as the impression he gave of being "born to rule".

Lamont and Sarwar also fell out at one point, after the leader seized control of the separate United With Labour pro-UK campaign and packed her deputy off on a bus.

After Scotland voted to stay in the Union on September 18, Labour's cauldron of tensions bubbled up in Manchester at the UK party conference.

Lamont was incensed at press briefings that Murphy was poised to take her job, and hurt that Curran was not supporting her friend's choice of general secretary.

Lamont left Manchester defiant, giving interviews in which she said she would lead the party into 2016, but in reality she was isolated and wounded.

As the drumbeat grew louder, Lamont loaded her revolver by launching a review into devolving MP selections to Holyrood. MPs were incandescent.

Party sources say it was around this time that Curran started to question her old friend's leadership.

UK Labour then hit the nuclear button. Price was summoned to London two Fridays ago, where he was informed that his services were no longer required. Lamont had not been consulted about her own general secretary being removed.

As UK Labour flexed its muscles, the Left of the Scottish party also made its own demands.

Radical activists called for full autonomy of Scottish Labour, a change of party name and home rule for Holyrood.

Lamont's predecessors also piped up. McConnell said of his party's plight: "What is our purpose? Why should people support us? Why should we want to be the Scottish Government?"

McLeish also took aim, saying: "A lot of Labour voters don't know what the party stands for."

Facing a party divided into many groups and factions, some of which were openly briefing against her, Lamont decided it was time to leave the stage.

However, it would be simplistic to lay all the blame on MPs and UK Labour.

Lamont, according to Holyrood and Westminster sources, failed to use the significant powers she had as leader to useful effect.

For instance, Labour's 2011 Holyrood intake contained a number of "accidental" MSPs who were not up to the job.

Lamont was expected to lead a purge of under-performing list MSPs, as was the case with Glasgow councillors in 2012, but she bottled the move when sitting members resisted reform.

The Falkirk debacle was also more complex and petty than a simple Westminster screw-up.

When the Sunday Herald alerted Scottish Labour to the Falkirk issue in early 2013, Lamont's allies initially took a hands-off approach.

Although the Unite-backed candidate, Karie Murphy, found little support in Lamont's office, her selection rival Gregor Poynton was also viewed with suspicion.

Poynton is married to Labour MP Gemma Doyle, who is perceived to be a political ally of Jim Murphy.

Scottish Labour's slow response in Falkirk can pathetically be summarised as Lamont's team not wanting to aid the husband of a rival's ally.

And MSPs, like MPs, also questioned Lamont's key appointments.

When this newspaper mentioned Sinclair's impending departure to one MSP, the individual smiled and said: "Revenge."

Price was also regularly bad-mouthed by MSPs, some of whom saw him as a lightweight.

A senior party source said that London's decision to sack Price was a reflection on Lamont. They said: "The fact that she wouldn't axe him showed the level of incompetence around her."

Another insider said Lamont had "plenty" of organisational autonomy, but the problem was a lack of will and drive to push through a reform agenda.

A comparison of some of Lamont's speeches reveals the depth of her failure to reform Scottish Labour.

In December 2011, she accepted the leadership of her party with a promise: "Our one test will be what is in the interests of the people of Scotland - not what is in the interests of ourselves."

Yesterday, she quit, saying: "The Labour Party must recognise that the Scottish party has to be autonomous and not just a branch office of a party based in London."

Back in 2011, she boldly stated: "The only way we can change Scotland is by changing the Scottish Labour Party."

This weekend, she said bitterly: "Any leader whose general secretary can be removed by London without any consultation is in an untenable position."

Labour created the Scottish Parliament, but Lamont's resignation is further proof that the party has still to come to terms with devolution.