Nancy Pelosi, who has led Democrats in the US House of Representatives for almost two decades, has announced she is standing down from the role.
The 82-year-old is the most powerful Democrat in Congress and the first woman to serve as speaker of the House.
She will continue to represent her California district in the lower chamber of Congress.
It comes as Republicans are projected to take back control of the House following the midterm elections.
Republican Kevin McCarthy has won the party's nomination to be speaker in the new Congress and is likely to succeed Pelosi.
"I never would have thought that someday I would go from homemaker to House speaker," Pelosi said in a statement in the chamber on Thursday.
"I will not seek re-election to Democratic leadership in the next Congress. The hour has come for a new generation to lead the Democratic caucus," she said.
Pelosi will serve as speaker until January when a new Congress takes over, and will remain in the seat she first took up in 1987 until January 2025.
New York Congressman Hakeem Jeffries is widely expected to take up the top Democratic leadership post in the House, which would make him the first black congressional leader in US history.
Speaker of the House is the one congressional job detailed in the US Constitution. After the vice-president, it is next in line to the presidency.
The speaker and their deputies and committee chairs determine what bills are considered and voted on. They set the agenda and decide the rules governing debate.
Pelosi became minority leader, the title held by the person leading the opposition in the House, in 2003. The Democrats then took control of the House for the first time in more than a decade in 2006, and she became the first woman to lead a major party in either chamber of Congress.
Pelosi became minority leader again four years later but returned to the speaker's chair in 2018.
As speaker, Pelosi played a critical role in advancing - or thwarting - the agendas of multiple presidents.
She is widely credited with marshalling the passage of former President Barack Obama's signature healthcare legislation, as well as bills to address infrastructure and climate change under incumbent President Joe Biden.
Pelosi also directly challenged Donald Trump throughout his presidency, famously ripping up a copy of his State of the Union address behind his back.
John Lawrence, a former chief of staff to Pelosi, told the BBC he expected her to play an important role in counselling new members of Congress and working with the White House now that Democrats were in the minority again.
"There's never really a good time to leave," he said. "When you're in the ascendancy, you want to accomplish a great deal, and when things are going against you, you want to fight back."
In a statement on Thursday, President Biden called Pelosi "the most consequential speaker of the House of Representatives in our history".
- BBC