A battle over her support for transgender rights is not, by Nicola Sturgeon’s account, the reason she is quitting as Scotland’s first minister.
But the issue has dogged her in recent weeks, precipitating a clash with the British government and ensnaring her in a messy episode involving a convicted rapist who was held in a women’s prison.
Ms. Sturgeon’s problems began in December when the Scottish Parliament passed legislation that would allow transgender people to have the gender with which they identify legally recognized and to get a new birth certificate without a medical diagnosis.
Britain’s government swiftly rejected the law, saying that it conflicted with equality laws that apply across Britain, including Scotland.