WASHINGTON — On a Wednesday night in September, while President Biden backslapped in the Republican dugout during the annual congressional baseball game, Speaker Nancy Pelosi sat nearby, sober-faced and wagging her finger while speaking into her cellphone, toiling to salvage her party’s top legislative priority as it teetered on the brink of collapse.
On the other end of the line was Senator Joe Manchin III, Democrat of West Virginia, a crucial swing vote on Mr. Biden’s sweeping social policy bill, and Ms. Pelosi, seated in the V.I.P. section behind the dugout at Nationals Park, was trying to persuade him to embrace $2.1 trillion in spending and climate change provisions she considered essential for the legislation.
In a moment captured by C-SPAN cameras that went viral, Ms. Pelosi appeared to grow agitated as Mr. Manchin, according to sources apprised of the call, told her that he could not accept more than $1.5 trillion — and was prepared to provide a document clearly laying out his parameters for the package, benchmarks that House Democrats had been clamoring to see.
The call reflected how Ms. Pelosi’s pivotal role in shepherding Mr. Biden’s agenda on Capitol Hill has reached far beyond the House that is her primary responsibility and into the Senate, where she has engaged in quiet and little-noticed talks with key lawmakers who have the power to kill the package or propel it into law.
Her efforts — fraught with challenges and littered with near-death experiences for the bill — finally paid off on Friday with House passage of the $2.2 trillion social policy and climate change package.
Along the way, Ms. Pelosi, who is known for delivering legislative victories in tough circumstances, was forced repeatedly to pull back from a floor showdown on the bill as she labored to unite the feuding liberal and moderate factions in her caucus. A crucial but less-seen part of her task was sounding out and cajoling a pair of Democratic holdouts in the Senate, Mr. Manchin and Kyrsten Sinema of Arizona, who were opposed to major elements of Mr. Biden’s plan and had the power to upend whatever delicate deal Ms. Pelosi was able to strike.
It was only after her call with Mr. Manchin at the baseball game that Ms. Pelosi discovered that the West Virginian’s demands were contained in a sort of makeshift contract he had delivered to Senator Chuck Schumer, Democrat of New York and the majority leader, in late July. The document, which was signed by both men, had been kept secret — including from her — for months.
“I would have liked to have known that,” Ms. Pelosi, said in an interview on Friday, recounting how she felt blindsided. “However, it was what it was.”
Mr. Manchin’s insistence on holding down the cost of the package threw a wrench into Ms. Pelosi’s plan to quickly advance the monumental social policy bill, sending it instead through a series of tortuous twists and turns until Friday morning, when she finally managed to pass it.
She is still not done, with the Senate now getting a chance to reshape the measure in the hope of eventually sending it back for final House approval and Mr. Biden’s signature. Mr. Manchin is still demanding major changes, such as the jettisoning of a new four-week paid family and medical leave program that Ms. Pelosi has made a top priority.
But in the weeks since their call, Mr. Manchin has privately expressed an openness to embracing a costlier plan than the one he initially insisted upon, and the speaker now says she is confident that the measure approved by the House will re-emerge from the Senate mostly intact.
“They may want to hone or sharpen this or that, and that’s a negotiation,” Ms. Pelosi said of the Senate. “But 90-some percent of that bill is what it is.”
Initial approval of the legislation in the House was a considerable achievement in itself, considering unanimous Republican opposition and the deep Democratic divisions over the package.And it came in spite of whispers in the corridors of the Capitol that lawmakers no longer feared Ms. Pelosi as much as they had in the past, since she is believed to be nearing the end of her tenure.
In the end, as she did with the financial bailout in 2008, the Obama-era stimulus plan in 2009 and the Affordable Care Act in 2010, among others, Ms. Pelosi found a way to win when it appeared she could lose. This time, she did so with a bill that contains history-making initiatives for the environment and substantial health care, child care, family leave and educational programs that she and her Democratic colleagues have sought for decades.
Ms. Pelosi, 81, acknowledged in an interview on Friday that it was a legacy piece of legislation, even if she was not willing to entertain questions about her own future.
“We must pass it, and then we have to see it for me to have an almost religious experience of appreciating what it is,” Ms. Pelosi said in her Capitol office, not long after the vote to approve the bill, which was delayed until Friday morning by an angry eight-hour stemwinder from Representative Kevin McCarthy of California, the Republican leader. “But it’s a big deal.”
While her main responsibility was wrangling the House, Ms. Pelosi devoted considerable time to Mr. Manchin and Ms. Sinema, both of whom hold the power to scuttle the deal in the evenly divided Senate if they balk.
Ms. Pelosi has ties to both. She has bonded with Mr. Manchin, who like Ms. Pelosi grew up in a political family, over their shared Italian heritage and Catholicism and her work on health and pension benefits for coal miners, represented in her office by a statue of a miner gifted to her by Mr. Manchin.
When Ms. Pelosi wanted to send a message to Mr. Manchin about voting rights this year, she had it delivered on a literal silver platter given to her by Robert C. Byrd, the former Senate leader from West Virginia whom Mr. Manchin often cites as a guiding star. The tray, which is warmly inscribed in appreciation for Ms. Pelosi’s fund-raising work on delivering a Democratic Senate majority in 1987, was a reminder for Mr. Manchin of the speaker’s past relationship with his predecessor.
“I thought he should see it,” Ms. Pelosi said with a chuckle.
Ms. Pelosi knew Ms. Sinema as an activist in Arizona even before she was elected to the House, where they developed a mutual respect and rapport. It was warning signs from Ms. Sinema in late September that led Ms. Pelosi to begin the delicate task of separating the social policy bill from a bipartisan infrastructure measure that had already passed the Senate with Ms. Sinema as a main author.
Progressives were adamant that they would only back the public works bill after they were assured that Senate Democrats, notably Mr. Manchin and Ms. Sinema, were committed to voting for the social policy bill — an assurance that did not, and still does not, exist.
With the deadline for a vote approaching, Ms. Pelosi opened a back channel to Ms. Sinema through former Representative Joe Kennedy III, a friend of Ms. Sinema’s who entered the House with her in 2013.
He reported back that Ms. Sinema was ready to abandon the social spending bill entirely if she did not quickly see the House developing a path forward on the public works measure. In response, Ms. Pelosi sent a letter to her colleagues on Sept. 26 saying the House would take up the infrastructure bill the next day, a plan that drew vehement opposition from progressives and led to a stalemate for weeks.
As for Mr. Manchin, Ms. Pelosi intensified her outreach to him following a Sept. 16 video conference call she had with Mr. Biden and Mr. Schumer. The three Democrats, who have been friends and colleagues for decades, deepened their bond during the talks, ribbing and encouraging each other in their vastly varying styles.
Biden’s Social Policy Bill at a Glance
A narrow vote. The House passed President Biden’s social safety net and climate bill on Nov. 19. Democratic leaders must now coax the $2 trillion spending plan through the 50-50 Senate and navigate a tortuous budget process. Here’s a look at some key provisions:
Child care. The proposal would provide universal pre-K for all children ages 3 and 4 and subsidized child care for many families. The bill also extends an expanded tax credit for parents through 2022.
Paid leave. The proposal would provide workers with four weeks of paid family and medical leave, which would allow the United States to exit the group of only six countries in the world without any national paid leave.
Drug prices. The plan includes a provision that would, for the first time, allow the government to negotiate prices for some prescription drugs covered by Medicare.
Climate change. The single largest piece of the bill is $555 billion in climate programs. The centerpiece of the climate spending is about $300 billion in tax incentives for low-emission sources of energy.
Taxes. The plan calls for nearly $2 trillion in tax increases on corporations and the rich. The bill would also suspend a $10,000 cap on the SALT deduction, mostly to the benefit of wealthy Americans in liberal states.
During that particular call, according to people with direct knowledge of it, Mr. Biden told the two congressional leaders that he had been encouraged by his discussions with Ms. Sinema and Mr. Manchin, though they agreed it might be to their benefit to have Ms. Pelosi talk to Mr. Manchin as well.
“I’m with ya,” Mr. Biden told Ms. Pelosi and Mr. Schumer of their plans.
“Put an F-word in front of that,” Mr. Schumer said enthusiastically.
“Now that you’ve resorted to that language, I’m going to thank you, Mr. President,” retorted the speaker, who frowns on profanity.
“Nancy does not allow me to curse,” Mr. Schumer responded. “I try to curb my foul mouth in front of her, with some degree of success.”
“Every time I look at Nancy, I think of myself as some altar boy,” said the president.
When she went back to Mr. Manchin, he had a reassuring message.
“There is a place we can come together,” he told Ms. Pelosi, according to people with knowledge of the conversation. “I feel quite certain. I always want to make a deal.”
As attention now pivots to the Senate, Ms. Pelosi said Mr. Manchin should embrace the reductions he had already won in the social spending plan rather than pursue additional ones.
“Take pride in what you have already done,” she said she had advised Mr. Manchin, then quickly pivoted to the argument she has been making to Democrats who wanted a more generous bill: “It’s still a gigantic number.”
In reaching for such an ambitious measure, Republican critics charge that Ms. Pelosi is placing Democrats in political peril — “marching them right off a cliff,” in the words of Senator Mitch McConnell of Kentucky, the minority leader — as she prepares to leave Congress. Ms. Pelosi dismissed the criticism, but refused to address her own plans.
“The first to ask is the last to know,” she warned.
Ms. Pelosi credits Mr. Biden with the vision and persistence to pursue the social safety net and climate legislation, and he gave her and her colleagues credit of their own when he called on Friday to congratulate her after the vote.
He ended the conversation with what has become a routine expression of his regard for Ms. Pelosi, according to people with knowledge of the exchange.
“All right, love you,” Mr. Biden told her.
“Love you, too,” Ms. Pelosi responded.