This video can not be played
Watch: Five key moments in Nancy Pelosi's career
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 Mrs Pelosi.
"I never would have thought that someday I would go from homemaker to House speaker," Mrs 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.
Mrs 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 deputies and committee chairs determine what bills are considered and voted on. They set the agenda and decide the rules governing debate.
Mrs 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.
Mrs Pelosi became minority leader again four years later but returned to the speaker's chair in 2019.
Nancy Pelosi will go down in history as one of the most effective US congressional leaders – an invaluable asset for Democrats and a formidable opponent for Republicans.
Her legislative acumen, her impeccable sense of legislative timing and her instinct for political theatre have made her a force on Capitol Hill, as well as a lightning rod for criticism.
Her speeches and press conferences were hardly inspirational. But her ability to keep her fractious and often slim majority in the chamber together on key votes had few rivals.
Her strength has come at a price, however. It is in part because of these abilities that she became a hobgoblin of the right.
The duration and depth of her grip on House Democrats, stretching over two decades, has also stunted the growth of younger leaders within the chamber.
Now, at last, they may get their chance. But they will have large shoes to fill.
As speaker, Mrs 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.
Mrs Pelosi also directly challenged Donald Trump throughout his presidency, famously ripping up a copy of his State of the Union address behind his back.
Rumours around her future had swirled in the aftermath of a violent break-in at her home last month that left her husband Paul, 82, in need of skull surgery.
Lawmakers gave her a standing ovation on Thursday as she thanked them for their prayers and spoke of her "beloved partner in life and my pillar of support".
She later said that she has been struggling with "survivor's guilt" since the attack, according to the Washington Post, as her husband was hurt "because they were looking for me".
John Lawrence, a former chief of staff to Mrs 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 Mrs Pelosi "the most consequential speaker of the House of Representatives in our history".
Additional reporting by Samantha Granville
Nancy Pelosi's decades as a political powerhouse
Republicans win House control with narrow majority
McCarthy wins Republican nomination for Speaker
Indonesia quake kills scores and injures hundreds
Iran players decline to sing national anthem
Shamima Begum trafficked as child, tribunal hears
Malaysia election: Why isn't there a government yet?
How Covid is rising again in China
Tech layoffs threaten American dream of India workers
She Said stars praise women who accused Weinstein
Why Canada aims to bring in 1.5m immigrants by 2025
Which actor kicked off the World Cup? Our timed quiz…
Is Zimbabwe any better off without Mugabe?
A museum 2,300 years in the making
Albanian migrant: 'I wish I'd never tried to enter the UK'
The source of half the world's lithium
The clever homes hidden from pirates
The exes trapped in shared homes
© 2022 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.
‘This too shall pass away’ this famous Persian adage seems to be defeating us again and again in the case of COVID-19. Despite every effort