WASHINGTON (AP) - Former House Speaker Nancy Pelosi said Friday that she will seek reelection to Congress in 2024 as Democrats try to win back the majority.

Pelosi, 83, made the announcement before volunteers and labor allies in the San Francisco area district she has represented for more than 35 years.

“Now more than ever our City needs us to advance San Francisco values and further our recovery,” Pelosi said in a tweet. “Our country needs America to show the world that our flag is still there, with liberty and justice for ALL. That is why I am running for reelection - and respectfully ask for your vote.”

Republicans now control the House, but just narrowly, with a 222-212 majority and one vacancy. Democrats believe they have a chance to regain power as President Joe Biden runs for a second term.

Pelosi's announcement quells any talk of retirement for the long-serving leader, who, with the honorific title of speaker emeritus, remains an influential lawmaker, pivotal party figure and strong fundraiser for Democrats.

It also unfolds as Washington is grappling with the sunset of a political era as an older generation of leaders, including Biden, 80, face questions about their age. This past week, Senate Republican leader Mitch McConnell, 81, said he would finish his term as leader and senator despite concerns about his recent health episodes.

Pelosi has long charted her own course, from her arrival in Congress as one of few women elected to the House to her tenure as one of the most powerful women in U.S. politics.

First elected to Congress in 1987, Pelosi made history becoming the first female speaker in 2007, and in 2019 she regained the speaker's gavel.

Pelosi led the party through substantial legislative achievements, including passage of the Affordable Care Act, as well as turbulent times with two impeachments of Republican President Donald Trump and the Jan. 6, 2021, attack on the U.S. Capitol.

Her announcement comes as House Republicans are preparing to launch an impeachment inquiry into Biden over the business dealings of his son, Hunter.

Pelosi stepped away from the day-to-day political limelight after a younger generation of Democrats led by Minority Leader Hakeem Jeffries took charge in 2023, but she remains a political force and keeps a robust schedule of public and private events.

According to a person familiar with Pelosi's thinking about her 2024 decision, Pelosi believes democracy hangs in the balance in the upcoming election as she works to reelect Biden and make Jeffries the next House speaker

Pelosi is among the party's most prolific fundraisers for the House and key political strategists. She has said she does not intend to hover over the new Democratic House leadership team, but she and Jeffries are often seen huddling quietly on the House floor.

It's rare, but not unprecedented, for former party leaders to continue in Congress as members.

Back in California, Pelosi's decision to seek another term is sure to disappoint other Democrats who have wanted a run for the congressional seat.

But Pelosi has priorities she is trying to secure for her home state and especially San Francisco as the city works to recover from the coronavirus pandemic-era closures that have also dimmed other metro downtowns.

San Francisco faces a delicate moment, Pelosi believes, and needs federal resources to continue its recovery, said the person familiar with her thinking, who spoke on the condition of anonymity to discuss the matter.

One of the state's long-serving leaders, Democratic Sen. Dianne Feinstein, 90, has announced she would not seek another term.

Pelosi has long been portrayed as a political villain by Republican critics, who view her as a far-left liberal and raise vast sums of their own using her image and actions.

Last year, her husband, Paul Pelosi, was seriously injured when an attacker broke into the family's San Francisco home, seeking the Democratic leader at a highly divisive time in American politics. A trial is expected.