The two men have been battling for more than a year in long, failed rounds of on-and-off negotiations over President Joe Biden’s big rebuilding package for America. But the talks had stalled — again. With the midterm elections looming, control of Congress at stake, the president and his party were at the end of the line. Just four days earlier, Manchin had issued his latest ultimatum: Either scale back the ambitious proposal by dropping the climate change provisions so important to Biden and his party, or wait until September to try to pass any legislation , giving the economy a staggering 9.1% inflation a chance to cool down. With all avenues with his colleague exhausted, Schumer showed Biden that they needed to do everything they could before lawmakers left town for the summer break. From the White House, Biden had announced that it was time to make a deal. And Manchin faced his own political pressures. His outraged colleagues openly criticized his tactics as disingenuous — whispering, in fact, that the West Virginia senator should be removed from his position as committee chairman. The coal state conservative stood out publicly, still in shame, as the only figure stopping aid for a planet in peril. Before the meeting in the basement, Manchin put a new offer on the table. Details were scarce that Monday afternoon 10 days ago, but the size and scope shocked Schumer’s team and, more importantly, included a commitment to vote by the August recess. This account comes from several people who are familiar with the private conversations and have been granted anonymity to discuss them. The two men shook hands and agreed to start talking – again. “What a beautiful office,” Schumer wondered aloud in the Capitol basement. “It’s mine;” It was. What happened next was a week of largely unseen negotiations to produce the $739 billion surprise package now headed for quick votes in Congress. Biden praised the deal Thursday as a “godsend” for American families. “This bill is far from perfect,” Biden said from the White House. “It’s a compromise. But that’s often how progress is made.” He thanked Schumer and Manchin for the “extraordinary effort it took to reach this result.” The 725-page “Inflation Reduction Act of 2022” would cap prescription drug costs for seniors at $2,000 a year and help about 13 million families with subsidies buy their own health insurance policies. It invests $369 billion over the decade in tax incentives to fight climate change, including $4,000 for used electric vehicles and $7,500 for new ones. The package is largely paid for by imposing a minimum tax of 15% on companies earning more than $1 billion a year and allowing the federal government to negotiate directly with drug companies for lower costs. The remaining savings, about $300 billion, will go toward paying down deficits. With Republicans staunchly opposed, Democrats would need every senator in their 50-50 majority to secure a vote, which gives Manchin — and every other senator, really — such a strong negotiating hand. Manchin on a conference call Thursday with reporters called the final product a “win-win.” It almost didn’t happen. Biden and Manchin have barely spoken since negotiations suddenly collapsed late last year, a brutal end to the president’s once expansive “Build Back Better” project, a more than $4 trillion proposal for infrastructure investment and family support. The two had engaged in personal, frank discussions, including once at the president’s family home in Delaware, as Biden reached for an achievement on par with Franklin Delano Roosevelt’s New Deal, while Manchin always remained cool in such a broad , extensive effort. Despite months of talks, Manchin called it quits just before Christmas, angering colleagues and the White House, which publicly reprimanded the senator for the collapse of Biden’s domestic proposal. Relations between the president and the senator were beyond strained. Instead, Schumer took over working with Manchin in the new year as the White House turned negotiations back to Capitol Hill. The New York Democratic leader had to slow down, steadily trying to rebuild talks around a smaller but meaningful package that Manchin would support. Throughout, Manchin insisted he never walked away from talks. He was still in touch with the White House, speaking occasionally with Biden, and just didn’t want his Democratic Party to go overboard as he tried to rein in the president’s ambitious initiatives and keep spending low. “My main concern was inflation,” Manchin said, citing the high price of food and gas. “I hear it every day.” Manchin has also maintained close ties with Republicans, including Senate Republican Leader Mitch McConnell, who has publicly and privately encouraged Manchin to distance himself from the Democratic agenda. The Republican leader has openly considered welcoming the conservative senator into the ranks of the GOP. Just as negotiations appeared to be gaining ground ahead of the summer recess, Manchin stalled again on July 14 as inflation fears rose again. “I just couldn’t do it,” Manchin told Schumer. It got “hot and heated,” Manchin admitted. Colleagues were excited and even Manchin complained about their reaction. “That’s when the dogs bent — that night, saying I’m against all these things,” he said. Quietly, one senator after another reached out to Manchin, trying to bring him back to the table. Sen. Chris Coons, D-Del., a Biden ally, visited Manchin’s office, as did others, according to an aide familiar with the private conversations. Lawrence Summers, a former Clinton administration economic adviser, called Manchin to discuss the senator’s concerns about inflation. Coons listened, hearing the senator walk out as Manchin insisted he never left the table, despite the way he was portrayed. The best way to show naysayers he still wanted a deal, Coons advised, was for Manchin to propose the biggest package he could support. When Manchin and Schumer walked the halls that Monday at the Capitol, they acknowledged that “our composure is a little ahead of us sometimes,” Manchin said. “Let’s recalibrate,” Manchin suggested. The two met that Monday afternoon in the basement conference room, which had no windows but had a mural of the Capitol building, said one of the people familiar with the talks. After emerging with the handshake deal, they spent the next week and a half working on the package, even as Manchin had to stay in West Virginia after testing positive for COVID. After reaching a final deal Wednesday afternoon, Schumer and Manchin shook hands again — a “virtual handshake,” as they called it — miles away in a video call. The senators briefed the White House — Biden and Manchin were talking again. The president and senator, both isolated from COVID, compared symptoms. Schumer met privately with House Speaker Nancy Pelosi in his office and then briefed his fellow senators. “It’s been an important 24 hours,” Schumer said as he closed the Senate late Thursday ahead of next week’s vote. “If you do the right thing and persevere, you will succeed,” Schumer said in brief remarks at his office. “We persisted. Let’s hope we can make it.” ___ Associated Press writer Seung Min Kim contributed to this report.