Nancy Pelosi didn't just lose her job as speaker of the House five years ago; she was enthusiastically ejected by the newly elected Republican majority, many of whom had campaigned against her as a symbol of Washington liberalism.
But the San Francisco Democrat has never been one to go quietly. She has steadily rebuilt her power on Capitol Hill, exploiting divisions among those same Republicans who have weakened her successor, House Speaker John A. Boehner of Ohio.
Over the next week, as congressional leaders try to avoid another government shutdown, Pelosi will exert her rising clout as she tries to use a battle over the federal budget to win concessions from the GOP majority.
"She looks for opportunities to get things done," said Henry A. Waxman, the former congressman from Los Angeles and a Pelosi ally. "She's in a unique position as we approach the end of the year to demand that some of our priorities be recognized."
Pelosi's strength stems from Boehner's weakness: Hobbled by internal GOP divisions, and facing rebellious conservatives who would like to oust him from the speakership, Boehner cannot rally enough votes from his party to approve a spending bill. To pass a bill that would keep government agencies and departments running after Sept. 30, he will almost certainly have to rely on Democratic votes that Pelosi controls.
Boehner and his Senate counterpart, Majority Leader Mitch McConnell (R-Ky.), badly want to avoid another politically damaging shutdown like the 16-day episode two years ago. Government officials say that fight cost taxpayers an extra $24 billion to shut down government programs and then reopen them. Polls show that voters blamed the GOP for the stalemate, hurting the party's standing with the public.
But conservative Republicans say they will not vote for any spending bill unless Congress blocks federal grant money for Planned Parenthood. They say they are outraged over videos of the organization's officials discussing the use of tissue from aborted fetuses for scientific research. Some of those conservatives also see an opportunity to further weaken Boehner and build the case for removing him.
Many say they are frustrated after several years of seeing the party take bold stands during campaigns, only to compromise with President Obama after the elections.
"I'm tired of seeing the same dance: We promise, and nothing is followed through," said Rep. Paul Gosar (R-Ariz.), a dentist first elected on the 2010 tea party wave who has voted against Boehner for speaker. "How well has that gone the past five years? How well has that gone for us?"
House Republicans have the votes to pass a bill that would fund the government without including money for Planned Parenthood, but its chances in the Senate are slim. Even if it passed both chambers, Obama would veto any funding bill that eliminated money for the organization, which provides an array of healthcare services, and the Republicans lack enough votes for an override. Federal law already bans Planned Parenthood from using any taxpayer money for abortions except in cases of rape, incest or protecting the mother's life.
Enter Pelosi, who could serve up the Democratic votes Boehner would need to leave the conservatives behind and forge a bipartisan accord — for a price.
It's the latest example of the minority leader's ability to capitalize on GOP dysfunction to extract concessions.
"A lot of people who have forgotten Political Science 101, say, 'You've lost your power. You're in the minority.' That's true, if you have a unified majority," said John Lawrence, Pelosi's former chief of staff and now a professor at the University of California's campus in Washington. Republicans, he said, "tie their own hand behind their back, and that empowers Mrs. Pelosi."
Interviewed in her bright yellow office in the Capitol, Pelosi credits the Democratic caucus' unity for the ability to win battles for the minority.
"Our leverage springs from [Obama's] veto, but his leverage springs from our sustaining his veto," she said, "and that has taken some work."
Pelosi has used that leverage to great advantage. After first fending off opponents in her caucus when Democrats lost the majority, Pelosi has proven to be as skilled a deal maker as when she was the strong-armed speaker.
She delivered enough Democratic votes this month in support of the nuclear deal with Iran to stymie Republican-led opposition. Earlier this year, she surprised many by working quietly with Boehner to secure a pay raise for Medicare doctors, fixing a recurring problem with a long-term agreement that also boosted a children's healthcare program favored by Democrats.
She has also been willing to buck the president, as she did this summer when she temporarily halted fast-track trade authority for his Pacific trade pact in a show of political strength.
On the budget, Democratic leaders, after meeting with Obama at the White House last week, said they want a straightforward bill to keep government services running without new restrictions on Planned Parenthood.
But that's just their opening bid. Democrats are also seeking talks to reverse the deep, across-the-board budget cuts, known as a sequester, which were imposed in 2013. Lawmakers in both parties, with the exception of Boehner's most ardent small-government conservatives, want to undo some of the sequester cuts but disagree about how to do so.
Democrats are also aiming for longer-term investment in highway transportation funds that are set to run out Oct. 31. Also in the mix is reauthorization of the Export-Import Bank, the 80-year-old government-backed lending entity that conservatives are trying to close.
"My hope is that Congress aims a little higher than just not shutting the government down," Obama said in remarks to business executives last week. "We can actually do some things to help the economy grow."
Although Republicans have been wary of formal negotiations, McConnell has already acknowledged that Congress will "crack" the budget caps. Pelosi broached the subject with Boehner in a private meeting last week.
The speaker and the former speaker, it appears, have begun to talk.