Scottish First Minister Nicola Sturgeon on Wednesday announced her intention to resign, saying that part of serving in politics is knowing when it is time to make way for someone else.

Speaking at a news conference at her official residence in Edinburgh, Bute House, Sturgeon said she wrestled with the decision, but that the pressure of the job was relentless and that she is a human being as well as a politician.

Sturgeon, who has led the country's devolved government and the Scottish National Party for eight years, has faced months of controversy over a law that makes it simpler for people to change their gender on official documents, the BBC reported Wednesday.

The decision caught political observers by surprise, despite the ongoing controversy over the gender recognition measure. She had vowed to take the British government to court over its decision to block the law and argued that the Conservative U.K. government was making a "profound mistake" by vetoing the Gender Recognition Reform Bill.

UNITED KINGDOM PRIME MINISTER RISHI SUNAK PLEDGES TO WORK CONSTRUCTIVELY WITH SCOTLAND'S LEADER

Nicola Sturgeon standing at a podium giving a speech.

Nicola Sturgeon speaks during a press conference at Bute House in Edinburgh, Wednesday, Feb. 15 2023.  (Jane Barlow/Pool photo via AP)

Hailed as a landmark by transgender rights activists, the bill would allow people age 16 or older in Scotland to change the gender designation on their identity documents by self-declaration, removing the need for a medical diagnosis of gender dysphoria.

SCOTLAND POLICE BLASTED FOR REPORT DESCRIBING PEDOPHILES AS 'MINOR-ATTRACTED PEOPLE': 'BALONEY'

Nicola Sturgeon holding a press conference wearing a red blazer and standing in front of a white podium.

Nicola Sturgeon speaks during a press conference at Bute House in Edinburgh, Wednesday, Feb. 15 2023. (Jane Barlow/Pool photo via AP)

The legislation sets Scotland apart from the rest of the United Kingdom, where a medical diagnosis is needed before individuals can transition for legal purposes.

CHINA THREAT: BRITAIN, JAPAN SIGN MAJOR DEFENSE DEAL TO ALLOW MUTUAL TROOP ACCESS

SNP leader and First Minister of Scotland Nicola Sturgeon issues a statement at the Apex Grassmarket Hotel in Edinburgh, Wednesday, Nov. 23, 2022.

SNP leader and First Minister of Scotland Nicola Sturgeon issues a statement at the Apex Grassmarket Hotel in Edinburgh, Wednesday, Nov. 23, 2022. (Jane Barlow/PA via AP)

But the measure was only one controversy in a career where Sturgeon has been noted for rarely putting a foot wrong.

UNITED KINGDOM TEACHERS WANT TO RE-EDUCATE TEENAGE STUDENTS "BRAINWASHED" BY CONTROVERSIAL INFLUENCER : REPORT

Nicola Sturgeon

First Minister Nicola Sturgeon awaits the start of First Minister's Questions in the Scottish Parliament, on Jan. 26, 2023, in Edinburgh, Scotland.  (Ken Jack/Getty Images)

She had been lauded for her response, for example, to the COVID-19 pandemic, where she won praise for her sober, straight-talking abilities.

That catapulted the idea of Scottish independence from the United Kingdom — the long-held dream of Sturgeon’s nationalist government — back up the political agenda.

CLICK HERE TO DOWNLOAD THE FOX NEWS APP

Scotland is part of the U.K. but, like Wales and Northern Ireland, has its own semi-autonomous government with broad powers over areas including health care.