Senate Republicans hauled President Donald Trump’s big tax breaks and spending cuts bill to passage Tuesday on the narrowest of margins, pushing past opposition from Democrats and their own GOP ranks after a turbulent overnight session.

The outcome capped an unusually tense weekend of work at the Capitol, the president’s signature legislative priority teetering on the edge of approval or collapse. In the end that tally was 50-50, with Vice President JD Vance casting the tie-breaking vote.

Three Republican senators — Thom Tillis of North Carolina, Susan Collins of Maine and Rand Paul of Kentucky — joined all Democrats in voting against it.

“The big not so beautiful bill has passed,” Paul said after the vote.

The difficulty it took for Republicans, who have the majority hold in Congress, to wrestle the bill to this point is not expected to let up.

The package now goes back to the House, where Speaker Mike Johnson had warned senators not to deviate too far from what his chamber had already approved. But the Senate did make changes, particularly to Medicaid, risking more problems as they race to finish by Trump’s Fourth of July deadline.

The outcome is a pivotal moment for the president and his party, which have been consumed by the 940-page “One Big Beautiful Bill Act,” as it’s formally titled, and invested their political capital in delivering on the GOP’s sweep of power in Washington.

Trump acknowledged it’s “very complicated stuff,” as he departed the White House for Florida.

“I don’t want to go too crazy with cuts,” he said. “I don’t like cuts.”

What started as a routine but laborious day of amendment voting, in a process called vote-a-rama, spiraled into a round-the-clock slog as Republican leaders were buying time to shore up support.

The droning roll calls in the chamber belied the frenzied action to steady the bill. Grim-faced scenes played out on and off the Senate floor, amid exhaustion.

Senate Democratic Leader Chuck Schumer of New York said, “Republicans are in shambles because they know the bill is so unpopular.”

An analysis from the nonpartisan Congressional Budget Office found 11.8 million more Americans would become uninsured by 2034 if the bill became law. The CBO said the package would increase the deficit by nearly $3.3 trillion over the decade.

And on social media, billionaire Elon Musk was again lashing out at Republicans as “the PORKY PIG PARTY!!” for including the $5 trillion debt ceiling in the package, which is needed to allow continued borrowing to pay the bills.