The new law avoids a partial government shutdown because it extends money for the Pentagon and health and education programs through Sept. 30, 2019, and a number of other programs through Dec. 7.
Funding for those programs was scheduled to expire on Sunday at midnight.
This spending package reflects the compromise Republican leaders sought with the White House that postpones a fight over Trump’s demand for a border wall until after the Nov. 6 midterm elections.
The law sets the new Pentagon budget for 2019 at $606.5 billion, a $17 billion increase and a major priority for the White House and Republicans.
Funding for the Department of Health and Human Services, as well as the labor and education departments, would grow to $178 billion, a $1 billion increase and $11 billion more than the White House originally requested. This was a major priority for Democrats.
Because Republicans only narrowly control the Senate, they need support from Democrats to pass spending bills.
The legislation marks the continuance of a steep increase in funding since Trump took office, a sharp departure from GOP demands during the Obama administration to cut spending. White House officials have said they want to reduce spending but have little leverage because Democrats can block changes in the Senate.
The government is projected to spend close to $4.5 trillion next year, according to the Congressional Budget Office, but less than half of that will be approved by Congress. The rest is automatically disbursed through programs such as Social Security, Medicare, and Medicaid.
For months, Trump has demanded billions of dollars from Congress for the construction of a wall along the Mexican border, and he wanted that funding to be included in the new spending package. But GOP leaders believed this would prove to be too divisive ahead of the midterm elections and convinced Trump to postpone the debate over the funding until after Americans vote.
Trump, though, has said he is expecting Republicans to secure this funding after the election, and GOP leaders have not signaled how they plan to do this. Most Democrats — and some Republicans — have expressed opposition to the creation of a wall along the Mexican border. Some White House officials have sought as much as $5 billion for the construction this year, though the final price tag would likely be much higher.
During the 2016 presidential campaign, Trump described the wall as a top campaign promise, saying it would keep out drugs and immigrants. He also vowed Mexico would finance the wall’s construction, something the Mexican government has repeatedly refused to do.
The House of Representatives, where Republicans control a large majority, has sought to devote $5 billion toward construction of the wall, but Senate lawmakers have only agreed to direct $1.6 billion toward border security.
Even though lawmakers have pushed off decisions about the border wall and some other programs until December, they made more progress than usual in other areas. Trump has signed into law a bill that appropriated money for military construction and energy and water programs, as well as funding for the legislative branch for one year.
The spending bills that will need to be revisited by Dec. 7 pertain to agriculture, housing, homeland security and foreign aid, among other things. But it’s the decision over the border wall that is projected to dominate the debate.
Erica Werner contributed to this report.