WASHINGTON — President Donald Trump finalized an $854 billion spending bill on Friday that fully funds the military for fiscal 2019 and prevents a government shutdown next week, accomplishments that congressional leaders have called important and laudable.

But Trump’s signature came with one final attack on Democrats over the spending measure, lamenting lawmakers’ decision not to include extra money in the appropriations package for his planned wall along the southern U.S. border.

“Unfortunately, the radical Democrats refuse to support border security and want drugs and crime to pour into our country,” he said in a statement after signing the bill.

No shutdown: House finalizes FY19 military budget, and Trump drops his opposition The president says he will sign the funding measure, which gives the military its full-year budget on schedule for the first time in a decade.

The comments came just a week after Trump took to social media to blast “this ridiculous Spending Bill,” raising fears of a presidential veto on Capitol Hill. Instead, Trump largely praised the measure on Friday, calling it “important legislation to rebuild our military” and promote other domestic priorities.

The appropriations measure includes $674 billion in defense funding for fiscal 2019, and marks the first time in a decade Congress has finalized the spending measure before the start of the new fiscal year.

The measure funds a 2.6 percent pay raise for troops starting next January and a boost in military end strength of 16,400 spread across the active-duty and reserve forces.

Trump, in his statement, praised the measure for including “93 new F-35 Lightning Joint Strike Fighters, 142 Apache and Black Hawk helicopters, and 13 Navy battle force ships — made right here in the USA.”

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

In a statement after the signing, House Armed Services Committee Chairman Mac Thornberry, R-Texas, praised the president for pushing for the funding increases in his budget request and past public statements.

“By funding our military in full and on time, we can begin to restore its strength, agility, and effectiveness,” he said. “As I have said before, the task before us now is to make full, on time funding of our military the rule in Washington, and not the exception.”

The spending bill also includes full-year funding for the departments of Health and Human Services, Education and Labor, as well as bridge funding for a handful of other government agencies to keep them operational through Dec. 7.

Last week, Trump signed into law a separate package that included full-year funding for the Department of Veterans Affairs and for military construction projects.