The bill cleared both houses of Congress this week and Trump signed it into law behind closed doors at his home in central New Jersey, well ahead of a midnight Friday deadline for some government operations to begin shutting down.
But other budget battles lie ahead as the White House and Congress hammer out a spending plan for the fiscal year that starts October 1.
Republicans praised USD 15 billion in additional Pentagon spending obtained by Trump, as well as USD 1.5 billion in emergency spending for border security, though not for the wall he has vowed to build along the US-Mexico border to deter illegal immigration.
Trump also wants a huge military buildup matched by cuts to popular domestic programs and foreign aid accounts.
Republicans and Democrats who negotiated the measure Trump signed Friday had successfully defended other accounts Trump had targeted for spending cuts, such as foreign aid, the Environmental Protection Agency, support for the arts and economic development grants, among others.
The sweeping, 1,665-page bill also increases spending for NASA, medical research, and the FBI and other federal law enforcement agencies.
Trump took to Twitter earlier this week to complain about the bipartisan process that produced the measure but later changed his tone and began highlighting the spending that was added for the military and for border security.