House Speaker Nancy Pelosi has never been so alone.
In her first go-around as speaker from 2007 to 2011, her House majority was twinned with a Democratic majority in the Senate and, for the final two years, a Democrat in the White House, as they notched legacy-building achievements on Obamacare and Wall Street reforms.
Now the 17-term lawmaker from San Francisco is the undisputed top Democrat in Washington, but her job is totally different. She is the solitary bulwark against an aggressive Republican president and Republicans who control the Senate.
As Congress returns this week from a five-week summer break to face a daunting to-do list in a short period, Mrs. Pelosi is also dealing with a sizable and growing left wing that has flanked her and is increasingly agitating for a more aggressive ideology to trump her pragmatism.
Mrs. Pelosi has notched some victories, including a two-year budget deal with President Trump last month that delivered a massive boost in public spending on Democratic priorities. But she suffered perhaps the worst defeat of her career in June when she was forced to swallow a Senate-written border spending bill demanded by Mr. Trump that reflected few priorities of the House Democratic majority.
Despite all that, Congress watchers say, Mrs. Pelosi has maintained remarkable unity within her troops since taking the gavel this year. The House, with overwhelming support from Democrats and even a smattering of Republicans, has passed bills to raise the federal minimum wage, to expand gun control and to further regulate political speech.
“Legislative politics, and leadership in legislative politics, is a sloppy endeavor. And the people that do it well irritate some people on Monday and irritate an entirely different group of people on Tuesday and then Wednesday pass 10 bills out of the House,” said John Hudak, deputy director of the Brookings Institution’s Center for Effective Public Management.
The fall session poses the toughest test yet of Mrs. Pelosi’s second speakership as she tries to keep her troops from rushing toward an impeachment inquiry of Mr. Trump when a majority of Americans — and an embattled moderate minority within her caucus — think it’s a bad idea.
Mrs. Pelosi’s standard line is that the relevant committees can conduct investigations but any talk of impeachment must wait. But the committee chairs are framing their investigations as the first steps toward possible impeachment, leaving Mrs. Pelosi in a precarious position.
Asher Hildebrand, an associate professor at Duke University, said the speaker is cognizant that her party has deep divides and that the quiet moderates played a bigger role than the outspoken liberals in winning back the Democratic majority in midterm elections last year — and are the ones who ensured Mrs. Pelosi is speaker today.
“She would much prefer to be speaker in the next Congress with a Democratic majority and a Democratic president,” Mr. Hildebrand said. “The impeachment question has all kinds of questions that she’s going to have to navigate.”
It’s a new dichotomy for Mrs. Pelosi, who a decade ago was seen as an avatar of the left wing of her party. While she worked to accommodate moderates in her party, she was moving substantially on her own beliefs.
Now she has been outflanked by the likes of Rep. Alexandria Ocasio-Cortez of New York and other liberals for whom democratic socialism is the goal and patience is not seen as a virtue.
Robert Shapiro, a political science professor at Columbia University, said Mrs. Pelosi is “leading the center of the party” and has to protect lawmakers from moderate districts while her left flank demands an ever-further leftward tilt.
Although Mrs. Pelosi has been dismissive of far-reaching, expensive ideas such as the Green New Deal, she faced her most important clash early this summer when Mr. Trump was seeking an emergency infusion of cash to help the departments of Homeland Security and Health and Human Services manage the crisis at the border, which was overwhelmed with migrants.
Moderates were ready to approve a bipartisan Senate bill to provide the funds, but liberals insisted on trying to preserve their own political priorities in the final bill.
In the end, Mrs. Pelosi avoided a fight with the White House and accepted the Senate bill — sending Ms. Ocasio-Cortez and her allies to Twitter to vent. Mrs. Pelosi fired back, and Ms. Ocasio-Cortez said Mrs. Pelosi was targeting minority women. Analysts said one of the most remarkable things about the dust-up was how it played out in full public view.
“What used to happen behind closed doors doesn’t anymore because people feel it’s necessary to call everybody out in public,” said Capri Cafaro, an executive in residence at American University School of Public Affairs and a former state senator in Ohio.
Twitter was a fringe operation the last time Mrs. Pelosi wielded the gavel in the House, and she was able to keep such fights relatively private.
Perhaps her greatest calls were on Obamacare in 2009, when she initially got the House to pass a left-wing health care bill.
The Senate countered with a less-aggressive version, the Affordable Care Act. Mrs. Pelosi had a choice of either accepting the Senate bill or losing the chance at historic health care reforms.
She cut deals to gain the votes of some pro-life Democrats but rejected other changes. With no Republican votes, the bill passed and was signed by President Barack Obama in March 2010.
But the effort may have cost Mrs. Pelosi her speakership. Tea party-backed Republicans scored massive gains in midterm elections that November, and House Democrats were in the minority for the next eight years.
“The ACA stands out because there were moderate members that pushed back, and she flexed and got them to deliver. She delivered for President Obama, and she lost the majority as a result,” Ms. Cafaro said.
Mr. Shapiro said that fight helped shape Mrs. Pelosi’s leadership of the current Democratic majority, which confronts Republicans in the White House and the Senate.
“The irony is if you consider Obamacare as a more left-oriented policy, the advantage was she had a Democratic president, and for that very brief period there were 60 Democratic senators. That allowed the party to move further to the left,” he said.