For a decade, they were the indivisible duo who drove the quest for Scotland’s independence, steering their party — and themselves — to power along the way.

But in politics few friendships are forever, and that of Scotland’s first minister, Nicola Sturgeon, and her predecessor and mentor, Alex Salmond, has not aged well — to the point that its breakdown is now threatening the independence movement just when its prospects seemed brightest.

The two giants of the Scottish National Party are locked in a bitter feud over the handling of allegations against Mr. Salmond that culminated in 2020, when he was tried on more than a dozen charges of sexual assault and found not guilty on all counts.

So vicious is the rift that some believe the fate of Scotland’s 314-year union with England could rest on a dispute about what Ms. Sturgeon knew when about the allegations, and whether she has told the truth.

“For the S.N.P. it is very serious,” said James Mitchell, professor of public policy at Edinburgh University, who pointed to Scottish Parliament elections in May, and to Ms. Sturgeon’s hopes for gains in them to justify demands for a second Scottish independence referendum.

“This has happened at the point where the S.N.P. is set to have good election results and when support for independence is at its highest,” said Professor Mitchell. “In those circumstances you would expect the party would unite, whereas in fact it has not been so disunited in decades.”

The case is so explosive because Mr. Salmond says Ms. Sturgeon misled Scottish lawmakers about her role and has not given a truthful account of how she handled the allegations against him. If true that would lead to calls for her resignation.

Ms. Sturgeon denies the claims and says that those close to her former friend and mentor are peddling conspiracy theories while making contradictory claims against her.

But like all the worst arguments, this one is personal.

Mr. Salmond feels his reputation was destroyed by the allegations against him, which dated back to his time as first minister before 2014 and included one charge of attempted rape.

Some of his supporters think Ms. Sturgeon simply threw him to the wolves during a botched internal investigation of him in 2018 (well before the police were involved), in her zeal to show zero tolerance of sexual harassment.

Others theorize she actively wanted him out of the way to prevent his return to politics as a potential rival.

Ruth Davidson, the leader of the Scottish Conservatives, has talked of a “cover-up at the heart of government,” and the dispute has embroiled Peter Murrell, the chief executive of the S.N.P., who also happens to be married to Ms. Sturgeon.

With two separate inquiries underway — amid claims that evidence is being suppressed and a legal battle over press freedom — the bewildering complexity and endless twists and turns of the case have made no significant impact on public opinion so far, according to John Curtice, a polling expert and professor of politics at the University of Strathclyde.

In terms of the claims of a conspiracy, “the tail has not been pinned on the donkey,” he said.

However, he also noted that support for independence has stagnated in recent weeks. “It has long been obvious that the most serious risk to the S.N.P. being successful in the May elections is the S.N.P. itself,” Professor Curtice said.

That is partly because the infighting has divided the S.N.P. into warring camps, exposing other divisions within a party once renowned for ironclad unity — for example, over how patient to be in the quest for a second independence referendum.

In a reshuffle earlier this month, Joanna Cherry, a high-profile lawmaker in the British Parliament, was stripped of her role as spokesperson on home affairs and justice, in what many saw as a factional purge of those critical of Ms. Sturgeon.

Ms. Sturgeon’s critics also include Jim Sillars, a veteran of the independence movement who once clashed with Mr. Salmond but now sees his successor as the problem.

“The mentality at the highest reaches of the S.N.P. is rather like the divine right of kings: They think that no one can touch them,” Mr. Sillars said.

“This lot have been in power for 14 years, they have enjoyed the elixir of power, they don’t want to give it up. They thought Salmond might be a threat and therefore decided to do him in,” he added.

The civil war comes at a time when things had been going well for Ms. Sturgeon, after a succession of opinion polls showed a majority of Scots favoring independence. Her approval ratings in Scotland far exceed those of Prime Minister Boris Johnson, whose upper class English mannerisms tend to grate with Scots.

And, though the Covid-19 crisis has been as grave in Scotland as in England, Ms. Sturgeon’s serious manner and polished presentation have won her plaudits in contrast to Mr. Johnson’s bumbling persona, particularly in the early stages of the pandemic.

Many of Ms. Sturgeon’s skills were learned from Mr. Salmond, a brash, formidable, sometimes acerbic debater, who was leader of the S.N.P. twice, from 1990 to 2000 and from 2004 to 2014.

After constitutional changes re-established a Scottish Parliament in 1999, Mr. Salmond oversaw the transformation of the S.N.P. from a powerless gaggle of lawmakers at Westminster to the dominant political force in Edinburgh.

Scottish nationalism was rebranded as progressive and inclusive, and the party tilted somewhat to the left, favoring European integration, which it once opposed, and welcoming immigrants from the bloc.

Mr. Salmond first spotted Ms. Sturgeon’s talent when she was a student; as she once put it, “he believed in me long before I believed in myself.”

In 2004 Mr. Salmond dissuaded her from fighting a leadership battle he was convinced she would lose, and instead returned to the top job with Ms. Sturgeon as his deputy.

Ms. Sturgeon’s next opportunity arrived in 2014, after Scots rejected independence in a referendum, causing Mr. Salmond to quit as first minister and S.N.P. leader. By then, Ms. Sturgeon had established herself as his inevitable successor.

But tensions between the new leader and her predecessor grew after he won re-election to the British Parliament in 2015.

Nor did they subside when Mr. Salmond lost that seat again in the 2017 general election and found new ways to command attention, staging a one-man show at the Edinburgh Fringe festival and hosting a TV chat show on RT, the network formerly known as Russia Today.

“He couldn’t let go, and she wouldn’t find him a role,” said Professor Mitchell. “She is a control freak in the way that she conducts the party, in the same way that he was. They are too similar; there was always going to be a problem.”

Quite how big that problem will prove to be remains to be seen. Professor Curtice thinks it likely that Ms. Sturgeon will ride out the storm and resist any calls for resignation. Given her strong handling of the coronavirus pandemic, she could probably survive even if she were deemed to have broken some ministerial rules.

But Professor Mitchell thinks Ms. Sturgeon could be severely damaged by the feud with Mr. Salmond, which is starting to change public perceptions.

“Things are beginning to shift in Scotland,” Professor Mitchell said, referring to growing scrutiny of Ms. Sturgeon’s account of events. He said Mr. Salmond “was the villain of the piece, but now people are asking questions.”

As for Mr. Salmond, he may be finished politically, but he is on a mission to restore his reputation, and that makes him a dangerous foe, Professor Mitchell said.

“The problem for her,” said Professor Mitchell, “is that he has nothing to lose.”