https://www.bbc.com-Image source, Getty Images
She has been at the top of US politics for decades and is one of the leading female voices in a male-dominated Congress.
But Nancy Pelosi has announced that she will no longer lead the Democrats in the House of Representatives, saying the time had come “for a new generation to lead the Democratic caucus”.
She will remain in the House as a member, representing California’s 12th district.
Mrs Pelosi is the first woman in US history to serve as speaker of the House and has played a critical role in advancing – or thwarting – the agendas of multiple presidents.
Her legislative acumen, her ability to keep a restless party united when it matters, and her instinct for political theatre have made her a force on Capitol Hill, as well as a lightning rod for criticism from her detractors.
Raised in a political family
Mrs Pelosi grew up in a political family, the youngest of seven children in the East Coast city of Baltimore, Maryland, where her father was once mayor.
She went to college in nearby Washington DC, where she met and eventually married financier Paul Pelosi.
They first moved to Manhattan, and then San Francisco, where Mrs Pelosi started as a housewife.
She had five children – four daughters and a son – in the space of six years.
In 1976, she became involved in politics, using her old family connections to help California Governor Jerry Brown win the Maryland primary as he ran for president.
She then rose through the ranks of the state’s Democratic Party, eventually becoming its chair and then winning a seat in Congress in 1987.
In 2001, she ran for House minority whip – her party’s vote-counter and second-in-command in the House of Representatives – and won a narrow victory.
The next year she moved up to minority leader, the title held by the person leading the opposition in the House.
Reaching the top
Mrs Pelosi was one of the highest-profile, most outspoken opponents of the US invasion of Iraq in 2003.
This stand was vindicated and paid dividends in 2006 when the Democrats took control of the House for the first time in 12 years.
She was elected by her party to be speaker of the House, becoming the first woman in that role 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.
Its massive office, in the Capitol rotunda, reflects the prestige of the job, with its own balcony looking out toward the Washington Monument.
The majority party in the House has virtually unfettered control over the legislative process. The speaker and her deputies and committee chairs determine what bills are considered and voted on. They set the agenda and decide the rules governing debate.
Mrs Pelosi was in the role for four years, until Democrats lost control of the lower chamber of Congress.
Despite the setback, Mrs Pelosi defeated several challenges within her own ranks, to take the gavel once more at the helm of a resurgent party in 2018.
Pelosi’s biggest moment
Mrs Pelosi faced very different circumstances when she returned to the speaker’s chair in 2018.
By then she was a lightning rod for Republican anger – in their eyes, representing the coastal elites pushing a big-spending, radical platform.
During the 2018 midterms campaign, for example, Republican incumbent Virginia Congressman David Brat mentioned Nancy Pelosi and her “liberal agenda” 21 times in one debate.
The move backfired for him – and his party – as Democrats swept to a historic win in the House.
But this time she had President Donald Trump as well as the wily Republican Senate Majority Leader Mitch McConnell as obstacles. So any bills her party got through the House didn’t go any further.
In viral terms, her big moment was her sarcastic #PelosiClap during Mr Trump’s State of the Union speech a month after she took office. It still lives on as a popular gif.
Most controversially, 12 months later she ripped up Mr Trump’s speech in front of the TV cameras. Accused of disrespect, she later defended the move, calling his words a “manifesto of mistruths”.
Taking on Trump, and beyond
Mrs Pelosi was initially reluctant to lead only the third ever impeachment of a US president.
But as more emerged in 2019 of Mr Trump’s dealings with Ukraine, she eventually said it was an abuse of power that could not be ignored.
He was accused of pressing Ukraine to dig up damaging information on Joe Biden, and using military aid as leverage – but was acquitted in the Republican-controlled Senate.
In her fourth term as speaker, after Mr Biden took office, she has been able to shepherd much of the president’s legislative agenda through her chamber despite the razor-thin margins.
In less than two years, Democrats in the House passed a Covid relief bill, a bipartisan infrastructure spending package, a multi-trillion-dollar environment and social spending programme, and legislation protecting gay marriage.
That she was able to pull this off, when losing more than a vote or two would have meant failure, is testament to her ability to keep her party’s liberal and centrist members in the fold.
More recently, she enraged China by becoming the most senior US lawmaker to visit Taiwan in 25 years. China views the island as its own, and punished the US with military drills and the curtailing of diplomatic relations in the aftermath of her trip.
The trip may have been means to burnish her political legacy, in the twilight of her long political career, says the BBC’s Anthony Zurcher.
It was a historic trip to end her tenure – setting down a marker for democracy over autocracy, as she has framed it – and could have been her way of exiting the stage with a flourish.
“I never would have thought that someday I would go from homemaker to House speaker,” Mrs Pelosi said in the House chamber as she announced she was standing down.
“The hour has come for a new generation to lead the Democratic caucus.”