The Senate on Thursday passed a bill to increase the U.S. budget and lift the debt ceiling for the next two years. The spending deal now heads to the Oval Office to be signed by President Donald Trump.

The legislation passed 67-28, with 23 Republicans and five Democrats voting against the bill. Its passage in Congress — shortly before senators leave Capitol Hill for the August recess — will push off the threat of a financial crisis and automatic spending cuts that were set to kick in.

The bill passed the House last week despite weak support from Republicans, even after Trump urged them to vote for the deal.

Conservative lawmakers and advocates have griped that the deal, which was hashed out in July between the White House and congressional leaders of both parties, doesn't take steps to curb spending or shrink ballooning U.S. deficits.

Rather, the bill raises spending by hundreds of billions of dollars, setting discretionary spending at about $1.37 trillion in fiscal 2020 and even higher in 2021.

Meanwhile, total U.S. government debt now tops $22 trillion, and the White House Office of Management and Budget projects a $1 trillion deficit for 2019.

"There's a day of reckoning with this," Sen. Rick Scott, R-Fla., said on Fox News ahead of the vote. The deal was expected to reach the 60-vote threshold required to pass in the Senate. Scott voted against the bill.