WASHINGTON — The Senate passed an overhaul to the U.S. tax code early Saturday morning, legislation that gives a massive tax reduction to corporations but an uneven set of cuts and benefits to individual taxpayers.

The vote was 51-49. Republican senators clapped as Vice President Mike Pence read the final tally. No Democrats or independents voted in favor of the bill, and they were joined in opposition by one Republican, Sen. Bob Corker (R-Tenn.)

Hollywood studios and media companies, along with much of the rest of corporate America, lobbied heavily in favor of the legislation, and they may save billions from cuts and more advantageous deductions.

The bill drops the corporate tax rate to 20%, from 35%, and it also contains a temporary provision that will allow for the immediate deduction of expenses from the production of movies, TV shows and theatrical productions made in the United States. An estimate based on their most recent fiscal year results showed that the MPAA’s six member companies would have saved $6 billion with the lower rate.

Negotiations now will begin with the House on how to reconcile their versions of tax reform, which have some significant differences. If they come up with compromise legislation, it would head back to both chambers for a vote.

Republicans have been determined to pass the bill this year, giving President Trump a significant legislative win after Congress failed to repeal or replace the Affordable Care Act.

The legislation would have a dramatic impact on the economy over the next decade — in what supporters believe will be a new era of economic growth, and detractors say will threaten the social safety net and imperil the country’s fiscal condition. The Senate bill also could have a major impact on the health insurance market, as it repeals the Affordable Care Act’s mandate to purchase coverage.

Pence called the legislation “a historic victory for the American people” and called it “President Trump’s ‘middle class miracle.'”

Democrats hammered the legislation, and even a number of prominent conservatives, for skewing a disproportionate share of tax cuts to the wealthy and adding at least $1 trillion to the federal deficit over the next decade. Critics also complained that a vote was being rushed for legislation that will impact all aspects of the U.S. economy.

“There was not one single hearing, not one, on the specifics of this legislation,” Sen. Ron Wyden (D-Oregon) said angrily from the Senate floor, complaining that Republicans had not even released the text of their legislation to Democrats as a vote was imminent. Sen. Michael Bennet (D-Colo.) called the tax bill a “disgrace.”

On social media, they were joined in their criticism by entertainment figures like Rob Reiner, Judd Apatow, Barbra Streisand and Cher.

Sen. Tim Scott (R-S.C.) accused Democrats of “fear-mongering.”

The text of the bill was finally released at about 6:30 p.m. ET, but Democrats still fumed that the GOP was giving them little time to read it. They also ridiculed a series of last-minute changes made to the legislation that were handwritten — illegibly — next to the bill text.

The legislation would roughly double the amount that individuals and couples could shield from taxation, but in turn they would no longer be able to deduct their state and local income taxes. That could hit taxpayers in states like California and New York particularly hard.

Moreover, a report from the Congressional Budget Office earlier this week showed that lower- and middle- income taxpayers would actually be left worse off under the legislation, primarily because of the repeal of the individual mandate. That move, according to the CBO, would have the effect of driving up health insurance rates, and 13 million would lose insurance by 2027.

On Thursday, the Joint Committee on Taxation issued another report that cast some doubt on the legislation’s impact on the economy, concluding that even after economic growth was factored in, the Senate bill would add $1 trillion to the deficit. The CBO estimated that it would raise the deficit by $1.4 trillion.

With no Democrats expected to vote for the legislation, Republicans had little wiggle room.

A vote was delayed on Thursday to try to appease concerns from some Republicans who were holdouts, including  Sen. Jeff Flake (R-Arizona), Sen. Susan Collins (R-Maine) and Corker. Changes were being negotiated throughout the day on Friday, and Democrats were quick to decry special deals cut to appease wavering Republicans and special interest lobbyists.

Flake, a persistent critic of Trump’s announced on Friday morning that he would support the legislation, in part after securing a commitment by Senate leadership and the White House to work with him on a solution to the Deferred Action for Childhood Arrivals program. That is the immigration program that has allowed undocumented individuals who came to the United States when they were children to remain in the country.

Collins also said that she would vote for the bill. She touted changes that she had secured from Senate Republican leaders, including provisions that would allow for the deduction of up to $10,000 of state and local property taxes. She also said that she received assurances that the legislation would not trigger Medicare cuts, although preventing the healthcare program from being slashed will still require a Senate waiver.

Corker, however, decided that he could not support the legislation.

“I wanted to get to yes. But at the end of the day, I am not able to cast aside my fiscal concerns and vote for legislation that I believe, based on the information I currently have, could deepen the debt burden on future generations,” he said in a statement on Friday afternoon.