ARTICLE AD BOX
By Philip Sim
BBC Scotland political correspondent
The SNP has suffered its biggest-ever backbench rebellion since it came to power in Scotland, with nine MSPs failing to back the Scottish government's gender reform legislation.
They included Ash Regan, who quit as the government's community safety minister shortly before the Holyrood vote.
How significant is the uprising and why have rebellions been so rare at the Scottish Parliament?
What happened?
The SNP was always expecting some of its MSPs to oppose its plan to make it easier for people to change their legally-recognised gender when it faced its first vote at Holyrood on Thursday.
The government hoped this could be held to single figures, and it was - just - with seven SNP MSPs voting against the general principles of the bill, while two more abstained.
But it was clear from Nicola Sturgeon's icy response to Ms Regan's resignation letter that the first minister and her team are not happy at all.
Ms Sturgeon said Ms Regan had not approached her to raise concerns before she quit - but friends of Ms Regan have disputed this, saying that the first minister was told of her opposition to the proposals by an adviser.
The government clearly want to nip any spirit of rebellion in the bud, and isn't in the mood for letting pleasantries intrude while imposing discipline.
This is also an issue the party has wrestled with for years, with the SNP being elected in 2016 and 2021 with manifesto commitments to reform the Gender Recognition Act, and it is keen to push on as quickly as possible after previously having to shelve the plans.
How big of a deal was this rebellion?
The SNP has 64 MSPs. A total of 25 of them are (or at least were) ministers, and bound by collective responsibility - they are required to sing from the same hymn sheet when it comes to government policy.
That means Ms Regan suffered the most immediate consequences, having given up her ministerial post while coming firmly under the spotlight in a topic where debate online often resembles a bin fire.
It also means eight out of the 39 backbenchers - 20% of the non-ministerial group - failed to vote with the government.
That number of rebels would cost the SNP-Green administration its majority, if they were to join a united opposition - an unnerving prospect for any government.
In this case, of course, it made little difference. The government still won the vote by 88 to 33, with four abstentions - every Labour, Lib Dem and Green MSP voted in favour, along with two Tories, who had been given a free vote.
The bill is going to pass comfortably through parliament and the government hopes that will put the issue to bed, at least at Holyrood, so that they can move on with the rest of their agenda.
What will happen to the rebels?
The SNP whips office - led by Gordon MacDonald - may be wondering what exactly to do now. They have never had to deal with a real rebellion before.
Ms Regan has lost her job, but it is unlikely that the nine rebels will lose the SNP whip. There are frankly too many of them, and this was not characterised as a confidence vote in the government.
A disagreement over this one issue doesn't change the fact they were elected as SNP MSPs and back the bulk of the party's agenda.
And they are united on the core issue which draws the SNP together. Earlier the same day, one of them was asking a helpful question at FMQs by querying whether Ms Sturgeon agreed that independence might be beneficial to Scotland.
A slap on the wrist seems the most likely outcome - if nothing else because at this early stage in a parliamentary term it could be better to keep these members inside the herd, rather than plotting on the outside.
Why are rebellions so rare?
The really striking thing about this episode is how unprecedented it was.
Holyrood does not have a tradition of backbench unrest in the way Westminster does, and the SNP benches have been incredibly united and disciplined in public since it took power in 2007.
Two MSPs quit to sit as independents following a row over Nato membership in 2012, but that followed a conference vote rather than a parliamentary one.
Ms Regan is reckoned to be only the second ever minister to quit a Scottish government over a matter of policy.
And the other - former Labour communities minister Malcolm Chisholm - said he actually thought his vote against Trident renewal would have been allowed because it was about a reserved matter.
Parties have developed an ever-stronger grip on their MSPs in recent years, particularly as so many longer-serving members have now retired.
The last election saw the likes of the SNP's Joan McAlpine and Alex Neil leaving the parliament, as did Adam Tomkins from the Conservatives, Neil Findlay and Johann Lamont from Labour, Andy Wightman from the Greens, and Mike Rumbles from the Lib Dems.
All were free-thinking members who might have broken the whip on their day if they felt strongly about an issue.
The selection process for prized constituency seats and list rankings means new crops of members are typically grateful to party chiefs, and less likely to forge off in their own direction.
This doesn't mean we have been left with a parliament of compliant drones. Fergus Ewing and Christine Grahame frequently ask difficult questions from the SNP back benches.
'Political tribalism'
Labour has the likes of Monica Lennon and Richard Leonard sitting occasionally at odds with the leadership, while in the gender reform vote, Jamie Greene and Sandesh Gulhane went against the rest of the Conservative group.
But there is concern that parties have completely taken over the parliamentary system.
In 2019, the original steering group of senior politicians who helped set up Holyrood wrote a report reflecting on 20 years of devolution.
They complained that the parliament is "driven much more by party political tribalism than we expected", noting that "parties dominate the debate with little scope for personal contributions and inclusive discourse".
They said the "polarised" nature of the party system had blunted the parliament's attempts to scrutinise the government, and that committees had become "a forum for delivering party politics rather than for challenging ideas or building cross-party consensus".
Because parties are ultimately in charge of MSP selection and of how the government and parliament are run, there is little prospect of this changing any time soon.
That means rebellions like the one over the gender reform bill are likely to remain rare events.