Nicola Sturgeon’s resignation removes one of the most formidable figures from British politics, one who has dedicated her life to the cause of Scottish independence.LONDON — Nicola Sturgeon, a fiery campaigner for Scotland’s independence who led its government for more than eight years, resigned on Wednesday, declaring that she was exhausted and had become too polarizing a figure to lead the country’s hurly-burly politics as it weighs another bid to break from Britain.Her resignation removes one of the most formidable figures from British politics. A skilled veteran of the United Kingdom’s system of power sharing and a sure-handed leader during the coronavirus pandemic, she outlasted four British prime ministers, while bedeviling each of them with her unyielding push for Scottish independence.But that goal has remained elusive and appears no closer than it was nearly a decade ago, when voters rejected a proposal for independence. Support for leaving the union has ebbed and flowed over the years, but the British government remains implacably opposed to another referendum. And Ms. Sturgeon said she was no longer the leader to see the battle through.“Is carrying on right for me?” Ms. Sturgeon, 52, said at a news conference in Edinburgh. “And, more important, is me carrying on right for my country, my party, and for the independence cause I have devoted my life to?”“I’ve reached the difficult conclusion that it’s not,” she said.In recent weeks, Ms. Sturgeon had also become embroiled in a dispute over the Scottish government’s transgender policy. Britain’s Parliament rejected legislation from Scotland’s Parliament making it easier for people to legally change their gender. Ms. Sturgeon said she would remain as first minister until the Scottish National Party, which controls Parliament, chooses a successor, most likely at a party conference next month. So dominant is her position that political analysts said there was no obvious successor — an acute problem for a party that faces a crossroads on independence, but a weakness that she said was another reason for her to relinquish the stage now.There was a distinct echo in Ms. Sturgeon’s resignation of the similar decision by Jacinda Ardern, the prime minister of New Zealand, who announced her resignation last month by saying she “no longer had enough in the tank.” Both women emphasized the relentless toll of their jobs and their yearning to focus on other parts of their lives.Journalists and members of the public gathered outside Bute House, the official residence of the first minister, where Ms. Sturgeon held a news conference.Pool photo by Jane BarlowLike Ms. Ardern, Ms. Sturgeon drew widespread attention for adopting policies on Covid that diverged from those of other countries — in her case, keeping lockdowns in place longer than in neighboring England. As with Ms. Ardern, Ms. Sturgeon’s Covid policies brought mixed results and her popularity, while still decent, dimmed as the urgency of the pandemic gave way to concerns about the economy.“While Sturgeon is effectively the equivalent of a state governor, she has an extraordinary international profile,” said Nicola McEwen, professor of territorial politics at the University of Edinburgh. “But she has become a figure who divides; there is a recognition that she may not be the person to get them to the next level.”Still, her announcement left Scotland’s political establishment slack jawed. Only last month, she told the BBC that she had “plenty in the tank” to continue leading Scotland and was “nowhere near ready” to step down.On Wednesday, however, Ms. Sturgeon said she had been wrestling for weeks over whether to resign. She spoke about only realizing now how exhausting the pandemic was for her, and said she had come to a final decision on Tuesday while attending the funeral of Allan Angus, a friend and leading figure in the Scottish National Party.Ms. Sturgeon has been married to Peter Murrell, the chief executive of the S.N.P., since 2010. She does not have children, but spoke about her twin niece and nephew during her resignation speech, noting that when she had entered government in 2007, both were very young and now they were celebrating their 17th birthday.Commuters heading home during rush hour in Edinburgh on Wednesday evening spoke of their surprise at Ms. Sturgeon’s choice. Regardless of their opinions on her politics, many said that it was an important moment for the nation.Sean MacMillan, 29, said he expected her decision to step down could have an impact on the push for a second independence referendum as she did not have a clear strong successor. “It is really unclear who is coming next, and I am sure it will change with that,” he said.Prime Minister Rishi Sunak offered restrained praise, thanking Ms. Sturgeon on Twitter “for her long-standing service. I wish her all the best for her next steps.” Mr. Sunak and Ms. Sturgeon have a cordial relationship, an improvement over the scarcely concealed hostility between her and one of Mr. Sunak’s predecessors, Boris Johnson.A photograph released by 10 Downing Street showing Prime Minister Rishi Sunak of Britain and First Minister Nicola Sturgeon of Scotland during a meeting in Inverness, Scotland, last month.Simon Walker/No 10 Downing Street, via ReutersMs. Sturgeon denied she had resigned over the transgender legislation or any other short-term political setbacks. But she said that in the current hothouse political environment, “issues that are controversial end up almost irrationally so.”Scotland’s law 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. But the British government swiftly overruled the Scottish Parliament, saying the law conflicted with equality laws that apply across Britain.For Ms. Sturgeon, passing the legislation was part of what she said was a deeply felt commitment to protect minority rights, and she denounced the British government’s decision to block it. But the law was less popular with the Scottish public than it was in Parliament. And it quickly became a cudgel in the heated cultural clash over transgender rights, with both sides seizing on it to attack the other.The debate was inflamed by the case of Isla Bryson, who was convicted of raping two women before her gender transition. She was initially placed in a women’s prison, prompting an outcry over the safety of other female inmates. Ms. Sturgeon later announced that Ms. Bryson had been moved to a men’s prison.The handling of the case exposed Ms. Sturgeon to sharp criticism and put her in an awkward position when she was quizzed repeatedly at a news conference about whether she regarded Ms. Bryson as a woman.“She regards herself as a woman,” a visibly frustrated Ms. Sturgeon replied. “I regard the individual as a rapist.”A rally against a controversial transgender legislation in Glasgow earlier this month.Andy Buchanan/Agence France-Presse — Getty ImagesWhen it came to independence, Ms. Sturgeon was rarely at a loss for words. Having joined the Scottish National Party when she was 16, she spent much of her time trying to secure for Scotland as much power over its own affairs as possible. Allies described her as one of the most important leaders of the era of devolution, when London delegated more power to Scotland, Wales and Northern Ireland.Ms. Sturgeon’s departure is unlikely to weaken Scotland’s independence drive. It is, after all, the Scottish National Party’s founding goal. But as the party gathers at next month’s conference to plot the next phase of the campaign, her absence could greatly affect their tactics and strategy.The Scottish government had at one point planned to schedule a second referendum next October, following the unsuccessful vote in 2014. But those hopes were dashed last November when Britain’s Supreme Court ruled that Scotland’s Parliament did not have the right to act unilaterally. The court upheld the authority of the British Parliament to consent to a referendum, which it has steadfastly refused to do.That has left the Scottish nationalists with a dilemma. Ms. Sturgeon has proposed that the Scots treat the next British general election, which must be held by January 2025, as a de facto referendum on independence. A clear majority for the Scottish National Party, she said, would effectively be a vote for independence.The problem with this approach, analysts said, is that it would lack legal or constitutional legitimacy. That could hurt Scotland’s quest to join the European Union, which it has said it wants to do after separating from Britain. There are practical questions about how Scotland would break away if Britain did not recognize the move.Other people in the party would prefer to continue to build support for independence in the hopes that the pro-independence majority would become so emphatic that the Parliament in London would have no choice but to go along.Ms. Sturgeon leaving the news conference on Wednesday where she announced she would step down.Pool photo by Jane BarlowSupport for independence has waxed and waned since 2014, when Scots voted against leaving by 55 percent to 45 percent. But the Brexit vote in 2016, which was deeply unpopular in Scotland, has built a durable, if small, majority in favor of independence. Scotland’s handling of the coronavirus pandemic, which many viewed as more sure-footed than England’s, also fired up separatist sentiment.The prospects for independence, analysts said, will depend in part on how the Scottish National Party handles life after Ms. Sturgeon.“The downside risks are obvious,” said John Curtice, a professor of politics at the University of Strathclyde and one of Britain’s leading experts on polling. “That the party will not be able to find someone with the communications skills of Sturgeon,” leaving the nationalists divided and without a plan.Ms. Sturgeon herself emphasized the necessity of having someone fully dedicated to her party’s causes. “Giving absolutely everything of yourself to this job is the only way to do it,” she said, before acknowledging that she was no longer able to do that. “The country deserves nothing less.”Megan Specia More