Senate Republicans were looking ahead to Friday after rewriting legislation to overhaul the nation's tax code Thursday evening in an effort to secure support from lawmakers who balked after a congressional analysis found the bill would add $1 trillion to the deficit over the next decade.

Senate Majority Whip John Cornyn, R-Texas, admitted to reporters that the bill would now have "alternative, frankly, tax increases we don't want to do" to deal with deficit concerns. The Senate adjourned Thursday night and is set to reconvene Friday morning.

GOP leaders had been optimistic the tax bill would pass quickly earlier in the day after Arizona Sen. John McCain and Alaska Sen. Lisa Murkowski announced their support. Republicans only have two votes to spare in the Senate, where they hold a 52-48 edge.

But their mood changed late in the day after the Senate's parliamentarian ruled that automatic "triggers" designed to guard against big deficits would violate Senate rules. GOP leaders' main concern was winning over lawmakers, including Sens. Bob Corker of Tennessee and Jeff Flake of Arizona, concerned about adding more red ink to the deficit.

In a dramatic turn late Thursday, Democrats forced a vote on whether to return the measure to the Senate Finance Committee so it could be rewritten to ensure smaller deficits. After holding out for nearly an hour during the vote, Corker, Flake and Ron Johnson of Wisconsin eventually joined fellow Republicans to scuttle the Democratic proposal.

Other Republican senators whose votes are being closely watched include Steve Daines of Montana; Susan Collins of Maine; Jerry Moran of Kansas and Marco Rubio of Florida.

SENATE TAKES UP TAX REFORM: HERE'S WHAT THE PLAN LOOKS LIKE

Corker has been pushing to add automatic tax increases in future years if the package doesn't raise as much revenue as projected.

With the provision dead, Corker said senators would change the bill to roll back some of the tax cuts in future years, regardless of whether tax revenues meet expectations. Flake said the tax increases would take affect after six years, though he didn't specify which taxes would go up.

The overall legislation would slash the corporate tax rate, offer more modest cuts for families and individuals and eliminate several popular deductions.

The new analysis by the nonpartisan Joint Committee on Taxation shows the tax package would increase economic growth, generating an additional $458 billion in tax revenue. The committee previously estimated the package would add $1.4 trillion to the deficit.

The additional revenue is a boost to the bill but is still far short of the $2 trillion promised by Treasury Secretary Steven Mnuchin.

The tax overhaul cleared a key procedural hurdle in the Senate on Wednesday on a 52-48 party-line vote, allowing senators to start debate on the legislation.

As it stands, the Senate’s tax overhaul plan is different from the House’s version. The two chambers would need to come together on a unified piece of legislation to advance to Trump’s desk.

Under the Senate bill, the standard deduction – which reduces the amount of income that is taxed – would increase to $12,000 for individual filers and $24,000 for married couples.

When it comes to reducing the corporate tax rate, both chambers want to see the tax rate lowered to 20 percent from 35 percent. However, the Senate measure would delay the implementation for one year.

The Senate’s tax plan would eliminate state and local tax deductions – meaning taxpayers in high-tax states would lose a write-off. This would affect mostly blue states, including California and New York.

The Senate’s tax plan also includes a repeal of the individual mandate, the ObamaCare requirement for Americans to have health care.

The Senate tax reform measure would leave the mortgage deduction pretty much alone, capping it at $1 million. The House plan, on the other hand, would drastically reduce the cap on the popular deduction to mortgage interest to $500,000.

Fox News' Chad Pergram, Kaitlyn Schallhorn and The Associated Press contributed to this report.