Congress has approved a bill keeping the government open through Dec. 7, as lawmakers move to avert a government shutdown looming next week.
The $854 billion bill also funds the military and a host of civilian agencies for the next year.
The House approved the bill, 361-61, on Wednesday, a week after the Senate approved it, 93-7.
The measure now goes to President Donald Trump, who said he will sign it. Trump's signature would avert a partial government shutdown set to begin Monday, weeks ahead of the Nov. 6 elections that will determine control of Congress.
U.S. & World
The day's top national and international news.
The spending bill includes $675 billion for the Defense Department and boosts military pay by 2.6 percent, the largest pay raise in nine years. It also increases spending for Health and Human Services, Education, Labor and other agencies, including a 5 percent boost for the National Institutes of Health
Trump said Wednesday he will sign the bill, telling reporters at the United Nations, "We're going to keep the government open."
Trump made the pledge despite his frustration that the bill does not pay for his long-promised wall along the U.S.-Mexico border — a fact Trump called "ridiculous."
The wall was a centerpiece of Trump's 2016 Republican presidential campaign, when he repeatedly promised that Mexico would pay for it.
Now, as president, Trump says it is "ridiculous" that Congress has yet to fully fund the project.
"Where is the money for border security and the wall in this ridiculous spending bill?" Trump tweeted last week, adding that Republicans "must finally get tough" against Democrats he said are obstructing law enforcement and border security.
Many conservatives shared Trump's frustration that money was included for Planned Parenthood but not the wall, but the spending bill still won easy approval in the House. Leaders from both parties supported it.
House Speaker Paul Ryan, R-Wis., hailed the bill.
"This funds our military, this funds opioids, this does a lot of the things that we all want to accomplish together," Ryan said before the vote.
Rep. Nita Lowey of New York, the top Democrat on the House Appropriations panel, also praised the bill, saying it "provides ample resources for our armed services and strengthens military readiness," while upholding commitments to service members and their families.
Lawmakers also "resoundingly rejected" Trump's proposed budget, Lowey said. The bill restores $10 billion in proposed cuts that she said would have hurt working families.
"Instead, we have secured increased funding for biomedical research at the National Institutes of Health, expanded opioid abuse treatment and prevention programs and (funded) new initiatives for maternal and child health," Lowey said.
Together with a spending bill signed by Trump last week, Congress has approved bills accounting for more than 70 percent of discretionary spending for the next budget year. Lawmakers had hoped to approve a third bill that would pay for the Interior, Agriculture, Transportation and other departments, but they could not reach agreement. Those agencies will be funded at current levels under the stopgap bill approved Wednesday.
Texas Rep. Kay Granger, who chairs a defense appropriations subcommittee, said before Wednesday's vote that she had "a great big smile on my face" anticipating the bill's approval.
"There's really nothing more important than securing our nation and making sure our people in the military have the equipment and the training they need," Granger, a Republican, told reporters.
The bill "shows really major investments in our air superiority, our shipbuilding, our ground forces: the things that (military leaders and troops) need and the things they deserve," she said.
The bill includes the largest pay raise for the military in nine years — a fact Granger said was about more than money. "It's to say that we're with you and we support you," she said, referring to U.S. troops at home and abroad.
Bills being considered in the House and Senate would provide funding for the border wall. GOP leaders have said they prefer to resolve the issue after the midterm elections.