With the sound of one final gavel, House Democrats on Wednesday completed the mammoth task of translating President Biden’s economic vision into a $3.5 trillion tax-and-spending proposal — marking a major milestone in a fight that’s still far from finished.

Assembling the House package proved to be an enormous undertaking, as Democrats raced over the past week to produce roughly 2,600 pages of legislative text spanning the party’s vast policy ambitions. The measure seeks to shepherd major changes to federal health care, education, immigration, climate and tax laws, introducing a sprawling set of federal programs that Democratic leaders have described as historic in their size and scope.

But the fruits of lawmakers’ labors quickly seemed overshadowed by political reality. A proposal that would try to lower the cost of prescription drugs for millions of seniors appeared in fresh jeopardy, after a small group of Democrats dealt it an early blow in the House. The fuller $3.5 trillion plan, meanwhile, faced even more significant hurdles in the Senate — prompting Biden to embark on a renewed effort Wednesday to try to reassure wavering members of his own party.

In a burst of personal outreach, Biden huddled with Sen. Kyrsten Sinema (D-Ariz.) in the morning, then met with Sen. Joe Manchin III (D-W.Va.) later in the day. Both centrists have signaled they are unwilling to vote for a final package unless Democrats come down in cost. Their opposition has infuriated liberal lawmakers, including Sen. Bernie Sanders (I-Vt.), who has rebuffed their attempts to whittle down the size of the plan — putting Democrats on a collision course in a chamber where they simply have no votes to spare.

“The president certainly believes there’ll be ongoing discussions,” White House press secretary Jen Psaki said Wednesday. “Not that there’s necessarily going to be a conclusion out of those today, but that was the primary focus and purpose of these meetings.”

If Democrats ultimately choose to reduce their spending, it may force the party to compromise on some of its core ambitions, a prospect that was not lost on Rep. John Yarmuth (D-Ky.), the House’s top budget-maker. He described the renewed objections as a “source of great frustration,” adding in an interview earlier this week that the caucus is holding firm.

“A significant number of our caucus — at least half, and probably significantly more than half — wanted to do more than $3.5 trillion,” he said. “It’s very frustrating for most of us, and I think it strengthened our resolve to move forward.”

For now, at least, House Democrats have secured the general policy objectives Biden outlined in the two blueprints he unveiled earlier this year. The president and his congressional allies have framed their $3.5 trillion agenda through the prism of history, likening it to the Great Society and New Deal investments from generations past.

The Build Back Better Act aims to expand Medicare, offering seniors access to hearing, dental and vision benefits. It also would extend a flurry of tax credits and other programs that make insurance more accessible and affordable, including for low-income Americans who seek coverage under Medicaid.

“It also finally closes the Medicaid coverage gap, which will expand coverage to more than four million uninsured Americans,” promised Rep. Frank Pallone Jr. (D-N.J.), the leader of the Energy and Commerce Committee, which debated the matter this week.

Democrats further set in motion a plan for roughly $750 billion to improve education and child care, including a new program that guarantees prekindergarten for all children ages 3 and 4. They authorized 12 weeks of paid family and medical leave for most working Americans, remedying a patchwork that leaves many without benefits today. And they crafted what lawmakers have described as the most significant set of legislative reforms ever to combat climate change, including a flurry of programs that reward clean energy, penalize polluters and help Americans finance more environmentally friendly homes and vehicles.

Much of the work is financed through a series of tax increases targeting wealthy Americans, profitable corporations and investors. The tax hikes stop short of what Biden initially had recommended, including by omitting new taxes targeting inheritances passed between family members. But they generally accomplish Democrats’ aims to unwind the tax cuts enacted under President Donald Trump four years earlier — all while raising about $2.9 trillion in revenue to cover the cost of the bill. Democrats contend the entire measure is financed in full since it fosters economic gains that essentially pay for themselves.

“Millions of Americans’ lives will change for the better thanks to these provisions,” said Rep. Richard E. Neal (D-Mass.), who chairs the tax-focused House Ways and Means Committee, during a hearing Tuesday. He said the tax increases ask the “biggest companies and the ultrawealthy to contribute more to the common good.”

Republicans unanimously have opposed the $3.5 trillion package, swiping at it repeatedly over the past week as reckless and wasteful. GOP leaders have alleged the combination of spending and tax increases would worsen the deficit, intensify inflation and erase the economic gains they secured before the pandemic under Trump.

“This is exactly what we said was coming: an economic surrender,” said Rep. Kevin Brady (R-Tex.), the top Republican on the Ways and Means Committee, during an interview on Fox Business. “We’re going to lose jobs to China, Russia, Europe and other countries. They’re going to clean our clock.”

Democrats still plan to fine-tune the proposal before bringing it to the House floor, all the while continuing negotiations with the Senate on a package that can clear both chambers. They face a race against the clock to finish their work before Sept. 27, at which point House Speaker Nancy Pelosi (D-Calif.) has promised she would move the House to begin considering a roughly $1 trillion effort to upgrade the nation’s infrastructure.

To pass it, Democrats intend to use the process known as reconciliation, which will allow party lawmakers to sidestep a Republican filibuster — but only if Pelosi and Senate Majority Leader Charles E. Schumer (D-N.Y.) can keep their caucuses together. Pelosi has only three votes to spare in the House, and Schumer has none in a Senate where Democrats can only break ties, leaving the party unable to afford defections.

With time tight, and the margin for error increasingly slim, Pelosi issued a plea to her caucus earlier this week, writing in a letter that Democrats must “stay united in our quest to reach our goal and honor our values.”

Already, though, there are signs that Democrats have started to stray.

As House lawmakers finalized their work Wednesday, Sinema and Manchin individually met with Biden at the White House. Manchin only a day earlier reiterated his opposition to a $3.5 trillion bill, as he instead proposed a package that could be only half that size. Manchin also has taken aim at key elements of Democrats’ plans to combat climate change, setting up further infighting as the debate shifts to the Senate.

Officials on Capitol Hill and at the White House said the separate meetings marked the first substantive chance for Biden to engage directly with the two pivotal senators and declined to discuss the sit-downs in much detail. Sinema spokesman John LaBombard said only that her meeting with Biden was “productive” and added: “Kyrsten is continuing to work in good faith with her colleagues and President Biden as this legislation develops.”

Publicly, though, White House chief of staff Ron Klain said at an event Wednesday that the $3.5 trillion package could be scaled back by cutting down the size of some new programs or trimming the duration of some of the spending. But he also made the case — aimed at the deficit-minded centrists in the Democratic Party — that the package at its current size ultimately would be paid for.

“The truth is, the cost of the Build Back Better plan is zero,” Klain said Wednesday during remarks at the SALT conference for investors and financiers.

House Democrats have spent the past week preemptively trying to ward off cuts to the cost, fearing that a smaller tax-and-spending package could imperil some of their most prized programs. That includes an extension of the expanded child tax credit, a program that aims to cut child poverty by allowing families to obtain bigger tax benefits paid on a monthly basis. Democrats opted to sunset the proposal in 2028, rather than extend it permanently as they initially hoped, to respond to spending concerns.

“I think the focus on a top line number is distracting from focusing on the substance of the bill,” said Rep. Suzan DelBene (D-Wash.), the leader of the moderate-leaning New Democrat Coalition. “You’ve got to look at what the other bill does.”

Senate Democrats have sought to tinker with a wide array of additional programs in the proposal. Manchin has raised the need for new work requirements on the child tax credit, an idea liberal lawmakers see as unacceptable. Other tensions linger among Democrats over climate change, as a subset of Democrats continue to push for a border tax targeting pollution and additional funding for other elements to combat emissions.

And Sen. Ron Wyden (D-Ore.), the leader of the chamber’s top tax committee, has pursued a series of additional tax increases targeting offshore earnings, stock buybacks and family inheritances that Neal in the House opted not to include in the proposal he advanced through the committee. Otherwise, Wyden maintained in a recent interview that the chambers are “rowing in the same direction” on taxes.

With significant swaths of the reconciliation bill still unsettled, Yarmuth, the House’s budget chairman, said he anticipated the chamber may have to proceed in two steps.

“I think that it looks right now like we’ll probably proceed to do our own bill and see if we can get 218 votes in the House to pass it, rather than wait for the Senate to act,” he said. “It looks like right now we’re going to end up getting the bill back from the Senate. The Senate is not as far along with some of their deliberations.”

Even more severe headaches emerged this week over Democrats’ plans to try to pursue prescription drug pricing reforms as part of an up-to $3.5 trillion reconciliation package. Lawmakers including Pelosi, a fierce advocate for the proposal, say they must empower Medicare to negotiate friendlier rates for seniors. But they have faced immense opposition from the pharmaceutical industry, which has run ads attacking party lawmakers, as well as a set of centrist Democrats.

The tensions flashed publicly Tuesday, as three Democrats on the House Energy and Commerce Committee pledged they would vote against the drug pricing plan. Reps. Scott Peters (Calif.), Kathleen Rice (N.Y.) and Kurt Schrader (Ore.) ultimately kept their promise a day later, leaving the panel deadlocked and unable to advance the policy.

“I want to be clear — I support Medicare drug price negotiations,” Schrader said this week. In response, he put forward his own counter offer that would limit Medicare’s power to negotiate to “the most expensive subset of drugs on the market.”

The pricing policy also has added significance, serving as a major financing piece of the broader $3.5 trillion package, as Democrats estimate it could raise billions of dollars to offset their spending. Another House committee has adopted the proposal, giving party leaders additional options to advance it — provided they can overcome dissent within their own ranks.

The still-widening schisms ultimately did not seem to faze Pelosi, who sent a second letter to House Democrats on Wednesday in the hours before lawmakers concluded their work.

“The vision and knowledge of President Biden and Congressional Democrats,” she began, “has enabled us to be on schedule in delivering the Build Back Better agenda.”

Seung Min Kim, Dan Diamond, Rachel Roubein and Amy Goldstein contributed to this report.