The Republican-controlled Senate voted 86-8 in favor of the National Defense Authorization Act (NDAA). The House of Representatives, led by Democrats, had passed the bill last week.
The senate decision sends the bill straight to the White House where according to Trump would be signed as soon as possible, saying it included all his priorities.
As one of the few pieces of major legislation that Congress passes each year, the NDAA becomes a vehicle for a range of policy measures, as well as for setting everything from military payment levels to ships or aircraft that will be upgraded, purchased or discontinued.
This year's legislation included a 3.1 percent increase in troop salaries, as well as the first paid family leave for all federal workers.
In addition, the legislation creates the Space Force, which is the first new branch of the U.S. military established in more than 60 years and a top military priority for Trump.
Some left-wing Democrats and libertarian Republicans voted against the NDAA because it did not restrict Trump's war powers, including a ban on support for Saudi Arabia's air campaign in Yemen. Some also opposed the increase in military spending, as the national debt is skyrocketing.
"Conservatism is more than supporting military spending at any cost," Republican Senator Rand Paul said.
Democratic leaders said that they had obtained some concessions from Republicans, one of which is the 12-week paid family leave for federal workers.
The 2020 NDAA increases defense spending by about US$20 billion. It includes US$658.4 billion for national security programs of the Departments of Defense and Energy, US$71.5 billion to pay for ongoing wars abroad, and US$5.3 billion in emergency funds for natural disaster repairs.