WASHINGTON (AP) — President Donald Trump signed an $854 billion spending bill on Friday to keep the federal government open through Dec. 7, averting a government shutdown in the weeks leading up to November’s pivotal midterm elections.

Trump signed the legislation to fund the military and several civilian agencies without journalists present as the fate of his Supreme Court nominee, Brett Kavanaugh, continued to hang in the balance. The House and Senate approved the spending plan earlier this week.

Trump said in a statement the legislation would “rebuild our military, protect our communities, and deliver a better future for all Americans.”

ADVERTISEMENT

But the passage — which avoids a shutdown before the elections that will determine control of Congress — also comes without significant new funding for Trump’s long-promised and long-stalled wall along the U.S.-Mexico border, a fact he’s called “ridiculous.”

Trump has expressed deep frustration for months over Republican lawmakers’ failure to deliver on the centerpiece of his 2016 campaign, and had been threatening a government shutdown to try to force their hands.

“I want to know, where is the money for Border Security and the WALL in this ridiculous Spending Bill, and where will it come from after the Midterms?” Trump tweeted last week, saying Republicans “MUST FINALLY GET TOUGH!” against Democrats who he said are obstructing law enforcement and border security.

GOP leaders had warned Trump a shutdown could be deeply damaging to Republicans in the midterms and said they preferred to resolve the issue after the Nov. 6 elections.

But Trump had questioned that logic, arguing a shutdown could, in fact, be beneficial politically.

Trump in his statement applauded the $1.6 billion the bill includes for wall funding — far short of the $5 billion he was seeking — but also blamed Democrats for failing to agree to more.

“Unfortunately, the radical Democrats refuse to support border security and want drugs and crime to pour into our country,” he railed.

In an interview with Hill.TV, he said his recent visit to the 9/11 Memorial in Pennsylvania to commemorate Flight 93 had renewed his resolve to build the wall, and alluded to potential immigration action he said he planned to take in the coming week.

ADVERTISEMENT

The spending plan includes $675 billion for the Defense Department, with money for new F-35 Lightning fighters, Apache and Black Hawk helicopters, and Navy battleships, and increases 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

___

Associated Press writers Matthew Daly and Ken Thomas contributed to this report.