JOANNA Cherry’s sacking was a long time in the making, according to SNP sources.

Although the Edinburgh South West MP had made a name for herself as one of the party’s smartest talents, she also put a host of noses out of joint along the way.

One source suggested the QC, who helped expose the farce of the UK Government spending millions on a ferry company with no ferries as part of its Brexit plans, and secured a court victory against No Deal, was ultimately sacked for “serial disloyalty” to the party leadership.

“It was long overdue,” said a colleague yesterday.

A key moment was Ms Cherry giving a damaging interview to The Times on the day the SNP conference opened in November.

But the more immediate cause of her dismissal was a row last week about trans rights. 

A wave of young people resigning from the party over a lack of progress on gender self-identification led Ms Sturgeon to take to Twitter with a personal appeal to stay.

SNP insiders say Ms Cherry, a staunch defender of sex-based women’s rights, was frequently cited as a problem by those quitting.

But her stance has attracted praise from others.

A senior SNP source stressed Ms Cherry was not sacked for her views, but for a "pattern of behaviour".

They said MPs had been left in tears and party members had resigned over her actions.

A motion of no confidence in Ms Cherry’s ability to occupy a frontbench position was circulated among the SNP’s Westminster group and was backed by around a dozen of the 47 MPs.

Although it wasn’t sent to Westminster leader Ian Blackford, he knew it was coming.

Last week’s meeting of the SNP Westminster group saw calls for Ms Cherry to be removed from her post – or even have the whip withdrawn.

“We were just sick of it all,” said one of those involved. “Serial disloyalty matters.

"Action had to be taken. Ian decided to get rid of her for disloyalty. There had to be consequences.” 

Another said it was “about time that Joanna faced some consequences for her behaviour”.

They said Ms Cherry tweeted about her sacking at the exact moment a virtual SNP meeting about the reshuffle was due to begin. 

But another Westminster source hit out at a lack of leadership among the SNP group, adding: “Things have got completely out of control. The toxicity is overwhelming.”

They predicted Ms Cherry would be even more vocal as a backbencher.

“She has got nothing to lose,” the source said. “She’s also got support.”