House lawmakers late Friday adopted a roughly $1.2 trillion measure to improve the country’s roads, bridges, pipes, ports and Internet connections, overcoming their own internecine divides to secure a long-sought burst in federal investment and deliver President Biden a major legislative win.

The bipartisan 228-to-206 vote marked the final milestone for the first of two pieces in the president’s sprawling economic agenda. The outcome sends to Biden’s desk an initiative that promises to deliver its benefits to all 50 states, a manifestation of his 2020 campaign pledge to rejuvenate the economy in the aftermath of the coronavirus pandemic and “build back better.”

The path to passage proved littered with political conflict, pushing to the limits a fractious party with still-widening ideological fissures. Democrats initially hoped to approve the infrastructure bill on Friday along with a separate, roughly $2 trillion proposal to overhaul the nation’s health care, education, immigration, climate and tax laws. Doing so would have advanced two spending initiatives that have been stalled on Capitol Hill for months.

Instead, House Democrats started only to debate, but did not finalize, the $2 trillion tax-and-spending package. Facing new delays, that bill remained bogged down in the broader war between liberals, who are eager to spend now that they are in the majority, and moderates, who continue to question the fiscal impacts of the bill.

House lawmakers passed the $1.2 trillion infrastructure bill on Nov. 5, sending it to President Biden to be signed into law. (Reuters)

In the end, it was a bipartisan coalition of Democrats with the aid of 13 Republicans that helped propel the infrastructure proposal to passage. When the gavel sounded after 11 p.m., cheers erupted from a mass of members who had crowded around House Speaker Nancy Pelosi (D-Calif.). They shared high fives and fist bumps with each other to cap off a tumultuous night.

“Generations from now, people will look back and know this is when America won the economic competition for the 21st Century,” Biden said in a statement lauding its passage.

The infrastructure proposal, nearly half of which constitutes new spending, marks one of the most significant investments in the country’s infrastructure since Congress responded to the Great Recession. It seeds new funding in the hopes of delivering urgently needed fixes to the country’s outdated inner-workings while setting the U.S. on track to tackle more intractable future challenges, including the fast-worsening climate crisis.

The bill includes more than $110 billion to replace and repair roads, bridges and highways, and $66 billion to boost rail, making it the most substantial such investment in the country’s passenger and commercial network since the creation of Amtrak about half a century ago. Lawmakers provided $55 billion to improve the nation’s water supply and replace lead pipes, $60 billion to modernize the power grid and billions in additional sums to expand speedy Internet access nationwide.

Many of the investments aim to promote green energy and combat some of the country’s worst sources of pollution. At Biden’s behest, for example, lawmakers approved $7.5 billion to build out a national network of vehicle charging stations. Reflecting the deadly, costly consequences of global warming, the package also allocates another roughly $50 billion to respond to emergencies including droughts, wildfires and major storms.

The bill now heads to the White House for Biden’s signature more than two months after Senate lawmakers approved it on a rare and overwhelming 69-to-30 bipartisan vote. Its success reflected Biden’s considerable toils alongside Democrats and Republicans — including Sens. Kyrsten Sinema (D-Ariz.) and Rob Portman (R-Ohio), two of its lead negotiators.

In the end, though, it was the Democratic Party’s unexpected struggles in two key elections Tuesday that provided the most resonant catalyst for action. A loss in Virginia’s gubernatorial race, and a tighter-than-expected victory in the fight for the governor’s mansion in New Jersey, left Democrats reeling and ready to forge ahead on their long-stalled priorities.

Taking to the House floor, some Democrats even appeared to acknowledge that their rare and narrow majority remains at risk unless they can deliver on their wider array of campaign promises before the 2022 midterms. “This legislation will mean that our majority will have delivered a major victory for the American people in a bipartisan way,” House Majority Leader Steny H. Hoyer (D-Md.) said in a speech.

House lawmakers had hoped to adopt the infrastructure bill sooner. But it quickly became a critical bargaining chip in a broader battle between liberal and moderate Democrats over the scope of Biden’s spending vision and the future of the party itself. By holding up infrastructure, liberals hoped to force moderates including Sinema to accept more spending than they otherwise might have as part of a second, still-forming package that aims to overhaul the country’s health care, education, immigration, climate and tax laws.

On one hand, the strategy appeared to work: After months of public sparring, Biden helped marshal a compromise that Democrats later turned into a $2 trillion tax-and-spending plan. That opened the door for House Speaker Nancy Pelosi (D-Calif.) to try to bring both to the floor on Friday — though the process that proved more politically treacherous than first anticipated.

Moderate Democrats earlier in the day privately told Pelosi they would not provide their must-have votes to advance the latter tax-and-spending measure until they could assess its fiscal impact. Pelosi then tried to resolve the matter by changing course, putting up the infrastructure measure first with a plan to hold off on considering the other half of Biden’s agenda for later. But that infuriated liberals, who threatened by the afternoon to withdraw their support in response.

The result was a stalemate that paralyzed the House into the night, forcing Pelosi to take to the floor herself to try to whip support among her ever-divided members. Without a resolution, it would have forced the speaker for the third time in the past two months to cancel planned votes on the bill.

At one point, Biden himself phoned directly into a still-unfinished, three-hour meeting of the left-leaning Congressional Progressive Caucus to encourage them to support the infrastructure bill, according to two people familiar with the matter who spoke on the condition of anonymity to describe the conversation. He placed similar calls to moderates, a White House official later confirmed, urging them to back the remainder of his agenda.

Throughout the skirmish, Pelosi and Democratic leaders remained defiant, pledging they would forge ahead with the votes as planned — even though it was not immediately clear if the speaker would prevail. Democrats could only afford three defections in the narrowly divided House unless they knew they would receive help from Republicans, leaving her little room for political error. And dozens of liberals at one point privately had signaled opposition to her approach, raising the prospects of a disastrous outcome.

But Democrats ultimately worked out an arrangement that allowed for the adoption of the infrastructure bill in exchange for a pledge from moderates that they would hold a vote on the other spending package by Nov. 15, providing the spending plan does not add to the deficit, as Democrats have promised.

“I am confident that during the week of November 15, the House will pass the Build Back Better Act,” Biden said in a statement.

Still, the arrangement did not satisfy the entire party: Six left-leaning Democrats including Reps. Alexandria Ocasio-Cortez of New York, Ilhan Omar of Minnesota and Cori Bush of Missouri ultimately voted against the measure.

Many Republicans, meanwhile, seized on the late-night votes to blast Democrats for their broader spending ambitions.

“This is going to induce more inflation that is hurting families all across America,” said Rep. Steve Scalise (R-La.), the Republican whip, as he urged lawmakers to “defeat this bill”

With congressional approval in hand, the vote on infrastructure still marked an end to decades of inaction in Washington over investments that both parties have previously described as critical.

For years, Democrats and Republicans alike had labored in pursuit of a massive infrastructure package only to stumble in their legislating as a result of infighting, lobbying and political distraction. The refrain for public-works investments became so commonplace under President Donald Trump that his days-long bursts of activity, known from time to time as “infrastructure week,” became a running joke in Washington about federal dysfunction.

Biden resurrected the conversation this spring, beginning with the March release of a roughly $2 trillion blueprint known as the American Jobs Plan, which called for massive investments to improve the country’s roads, bridges, pipes, ports and Internet connections.

Republicans shared a desire to improve the country’s inner-workings. But many initially opposed Biden’s plan to couple infrastructure investments with other spending that improve federal safety net programs, which they called superfluous and wasteful. The dispute at first sank talks between Biden and Republican lawmakers, threatening to deny the president — who arrived in office preaching a spirit of unity — an early bipartisan achievement.

But a collection of Senate Democrats and Republicans including Portman, Sinema and Sens. Mark R. Warner (D-Va.), Jon Tester (D-Mont.), Mitt Romney (R-Utah) and Susan Collins (R-Maine) revived the talks. Through marathon meetings that repeatedly verged on collapse, they produced a $1.2 trillion plan that proffered significant new spending to fix the country’s known deficiencies.

To be sure, the final bill is far less than what the White House initially sought. And lawmakers jettisoned some of Biden’s plans to pay for the package, which he initially had hoped to finance through tax increases on wealthy Americans and corporations — unwinding the tax cuts enacted under Trump in 2017. Instead, Congress relied on a pastiche of mechanisms that experts predict may not raise as much as some lawmakers say, including new reporting requirements on cryptocurrency that could be subject to legal challenge.

Embarking on his spending push this spring, Biden called it the most significant tranche of investment in the economy since World War II — portending potentially transformational changes for the country in the years to come.

“This is not a plan that tinkers around the edges. It is a once-in-a-generation investment in America, unlike anything we’ve done since we built the Interstate Highway System and the Space Race,” in the 1950s and ’60s, Biden said.