Just 65 Republicans, about one-third of the House Republican conference, voted in favor of the measure.
"Our fundamental principle is to make sure we have fiscal house in order. We understand we live in a House that has to find compromise," House Minority Leader Kevin McCarthy, R-Calif., said ahead of the vote. "This is not the bill that we would write. We are not in the majority."
This two-year agreement raises spending to $320 billion above previously-negotiated spending caps and suspends the debt ceiling for two years, allowing the federal government to continue borrowing to pay its bills while diminishing the prospects of another fiscal showdown over raising the borrowing limit before the 2020 election.
Assuming it all gets cleared through Congress and signed by Trump, it takes care of one of the few must-pass legislative items remaining on Congress and Trump's legislative to-do list before the 2020 election, along with appropriations bills in September 2019 and 2020.
The agreement on the top-line spending numbers should also make it easier for Congress to finish the appropriations process, putting the government on a path to avoid a government shutdown at the end of September.
The deal prevents automatic spending cuts, known as sequestration, from taking effect under the Budget Control Act of 2011. The agreement between then-President Barack Obama and congressional Republicans, including then-deficit hawk congressman and current acting White House chief of staff Mick Mulvaney, meant to rein in federal spending is now set to expire in 2021. This deal does little to address the mounting deficit, which has historically been a concern for Republican presidents.
The national debt now totals more than $22.5 trillion.
“We are closing in on $23 trillion in debt, and the latest bipartisan budget 'deal' would continue to push us further down the dangerous and unsustainable path we’re on," Rep. Jeff Duncan, R-S.C., noted in a statement after the vote. "We can’t keep making excuses while we pass this debt on to our children, recklessly throwing fiscal sanity out the window in the process."
Democrats had enough votes, 219, to pass the bill on their own.
"By passing the Bipartisan Budget Act of 2019, we have ended the threat of harsh austerity cuts and set the stage for strategic investments in our nation’s future," Rep. John Yarmuth, D-Ky., the chairman of the House Budget Committee, wrote in a statement. "Once approved by the Senate and signed into law by the President, this truly bipartisan legislation will provide much-needed certainty for our communities and our economy.”
Just 16 Democrats voted against the compromise. Freshman Rep. Ilhan Omar said she was "proud" the deal "made progress in prioritizing much-needed domestic investments in education, health care, and clean energy" but cited an increase to defense spending to justify her vote against the measure.
“However, I cannot in good conscience support a bill that continues to throw billions of dollars at endless wars and Pentagon contractors," Omar, D-Minn., noted. "In order to pursue peace and prosperity at home, we must not continue to destabilize entire countries, fuel migration crises, and put American troops at risk."
The bill next heads to the Senate, which is expected to vote sometime next week.
ABC News' Ben Siegel contributed to this report