Nancy Pelosi is once again Washington's most powerful woman, poised to reclaim the U.S. House of Representatives speaker's gavel Thursday as opponent-in-chief to an impulsive and unpredictable president.
Keeping Donald Trump in check will be among the California Democrat's top challenges as she presides over the House of Representatives through the 2020 elections, when her party aims to dethrone the Republican commander in chief.
Pelosi is almost certain to win Thursday's House vote for speaker, a position she held for four years from 2007, when she made history as the first woman ever to rise to that post.
When outgoing Speaker Paul Ryan yields to the 78-year-old, she will again become the nation's third most senior official and seal her reputation as one of the great survivors in American politics.
In her first stint, Pelosi was a strong opposing force to Republican George W. Bush in the final two years of his presidency. Her role as a restraint on Trump would be similar.
But she will also need to keep the reins tight on her own caucus, some of whose newly empowered progressives are seeking swift punitive measures against Trump in the coming months.
She and the Democratic leadership would have the power to block Republican legislation, hamstringing large parts of Trump's agenda ranging from proposed new tax cuts to building a wall on the border with Mexico.
And Pelosi could make life for Trump much harder if she uses subpoena power to compel administration officials to testify before Congress or turn over key documents, or if she launches impeachment proceedings.
So far, she has spoken out against using such a powerful political cudgel against him, arguing that the explosive step would likely mobilize Republican voters eager to protect the president.
In her reprised role, she will have to thread a political needle, standing up to Trump when needed but also showing that her party is capable of working with the president to pass legislation.
Her immediate task: finding a way to help end a standoff over Trump's border wall demand that has led to a partial government shutdown now stretching to 13 days.
Pelosi and other congressional leaders met with Trump Wednesday but failed to secure a deal to end the impasse.
Three weeks earlier, at a remarkable Oval Office confrontation with cameras rolling, Pelosi showed she was not afraid to go toe to toe with Trump in a public forum when he appeared to belittle her effort to secure support for her speakership.
"Please don't characterize the strength that I bring to this meeting as the leader of the House Democrats, who just won a big victory," a defiant Pelosi said.
'Respected,' not hated
Pelosi is unquestionably among the savviest political leaders of her generation. She shepherded then president Barack Obama's health law through the House to its contentious, historic passage in 2010.
Perhaps for that reason she is still seen by some as a liability eight years later, with Republicans presenting her as the ultimate liberal bogeywoman.
"Can you imagine Nancy Pelosi as speaker of the House?" Trump asked a crowd at a Minnesota rally in October. "Don't do that to me!"
Pelosi's big comeback was no foregone conclusion. But she shrewdly navigated a simmering party power struggle that saw dozens of House Democrats and candidates signaling their desire for change at the top.
The internal resistance largely stems from Pelosi's broad unpopularity among voters. But in an interview published Wednesday, she pushed back at the notion that she is reviled.
"I don't necessarily feel hated. I feel respected," she told Elle magazine. "They wouldn't come after me if I were not effective."
First elected in 1987
At least in part, Pelosi's reputation is shaped by years of rightwing attacks. Conservatives depict her, the wife of an investment millionaire from California, as the embodiment of a leftist elite.
She is accused of everything from wanting to raise taxes for middle-class families to supporting a massive influx of illegal immigrants.
For three decades, Pelosi has represented California's 12th congressional district, which includes San Francisco, a stronghold of left-wing politics, counter-culture and gay rights regarded by many heartland conservatives as a true Gomorrah.
Nancy Patricia D'Alesandro was born in Baltimore to a political family with Italian roots. Both her father and brother were mayors of the East Coast port city.
After studying political science in Washington, she moved with her husband to San Francisco, where they raised five children.
First elected to the House in 1987, Pelosi rose through the ranks to lead the chamber's Democrats beginning in 2002.
Steeled by countless political struggles, Pelosi has largely managed to hold her diverse caucus together.
U.S. politics requires donning "a suit of armor" and the ability "to take a punch," she has said.