The US Senate has approved a two-year federal budget deal that includes big spending increases.
The bill, which has already been passed by the House of Representatives, will suspend government borrowing limits until the end of July 2021.
It has yet to be signed by President Donald Trump, who campaigned for it despite opposition from conservatives.
Lawmakers said it would avert a budget crisis in the run-up to next year's presidential election.
However, it looks certain to add to already high levels of US government debt, which already stands at $22.5tn.
The agreement sets government spending at $1.37 trillion (£1.12tn) for the next financial year, beginning in October.
President Trump has described the deal as "phenomenal" and encouraged sceptical Republicans to "go for it".
"There is always plenty of time to CUT!" Mr Trump tweeted ahead of the vote.
Budget Deal is phenomenal for our Great Military, our Vets, and Jobs, Jobs, Jobs! Two year deal gets us past the Election. Go for it Republicans, there is always plenty of time to CUT!— Donald J. Trump (@realDonaldTrump) August 1, 2019
Before the vote was held, the outcome appeared to be in the balance - Republican Senate Majority Leader Mitch McConnell refused to confirm what numbers would vote in its favour.
"It's going to pass," he told CNN, without going into detail about how each senator in his caucus planned to vote.
After it passed, Mr McConnell said the legislation "ensures our federal government will not approach any kind of debt crisis in the coming weeks or months".
It passed by 67 votes to 28 with cross-party support, despite some opposition from conservative Republicans who were concerned at the high levels of spending.
The final vote from Republicans was 30 in favour, and 23 opposed. Five Democrats also voted against it.
Old habits die hard. Despite the vigorous urging of Donald Trump and Republican congressional leadership, rank and file members of the party offered only tepid support for the bipartisan budget deal that increased the US national debt ceiling and paved the way for higher government spending.
For most of the Obama administration, such a thing would be anathema to the entire party. Now, the president - despite campaigning on eliminating the budget deficit in 10 years - seems at peace with growing the annual shortfall to record levels.
It turns out many in his party aren't on board - at least, when it comes to issuing a "no" vote when a "yes" outcome is certain.
Over the past three years, congressional Republicans have been reluctant to cross their president, lest they draw his ire - and the political consequences that follow. The budget, it appears, is one line they seem willing to cross.
At least for the moment, the costs of appearing hypocritical on the nation's finances are higher than the prospect of a Trumpian condemnation that may never come.
One Republican senator, Rand Paul, who voted against the bill, told Breitbart News: "This may well be the most fiscally irresponsible thing we've done in the history of the United States."
"What is irresponsible is a Congress that believes they are Santa Claus and they can be everything to everyone and everything is free," he continued.
Today's vote was a litmus test for fiscal conservatism. Those senators who voted for an unlimited increase in the debt ceiling are not and have no right to call themselves conservatives. So America wake up and watch the votes today. pic.twitter.com/Rwn7dKxuqT— Senator Rand Paul (@RandPaul) August 1, 2019
Under the bill, defence spending will go up from $716bn this year to $738bn next year, while non-defence spending will rise from $605bn to $632bn.
Treasury Secretary Steven Mnuchin had warned that if the bill failed to pass, the government could run out of money during the summer Congressional recess, triggering another government shutdown.
The last time that happened, in January, it cost the US economy an estimated $3bn.