Despite conservative complaints that it will fuel the nation’s runaway debt, President Trump on Friday signed a broad, two-year budget deal that boosts spending and eliminates the threat of a debt default until after the 2020 election.

The White House announced without fanfare that Trump had signed the legislation, which reduces the chances for another government shutdown during the remainder of his term.

Republican leaders, including Trump, worked to secure GOP support ahead of a Senate vote on Thursday, trying to avoid a repeat of the outcome in the Democratic-controlled House last week, when a majority of Republican lawmakers ignored Trump’s pleas and voted against the deal.

“Budget Deal is phenomenal for our Great Military, our Vets, and Jobs, Jobs, Jobs!” Trump wrote on Twitter ahead of the Senate vote. “Two year deal gets us past the Election. Go for it Republicans, there is always plenty of time to CUT!”

The bill got through the GOP-controlled Senate, with 30 of the 53 Republican senators voting in favor. Five Democratic senators also voted “no,” making the final tally 67-to-28.

The agreement heads off several looming fiscal threats, most immediately the possibility that the Treasury Department could have run out of money to pay its bills as early as September if Congress did not act, resulting in a market-shattering default on U.S. obligations.

The deal passed suspends the debt ceiling through July 31, 2021, removing the threat of default and the accompanying risk of political brinkmanship that typically accompanies debt limit negotiations.

It lifts strict Obama-era spending caps that would otherwise slash indiscriminately into agency and military budgets and sets overall spending levels that will make it easier for lawmakers to write the individual appropriations bills needed to keep the government open past Oct. 1, when current agency budgets expire.

The deal came together after weeks of intense negotiations between the Trump White House and House Speaker Nancy Pelosi (D-Calif.), which proceeded even as the president sparred with congressional Democrats on multiple other fronts, and increasing numbers of them called for his impeachment. The agreement stands as a rare example of bipartisan legislating in the Trump era and is one of the few major votes Congress will take this year.