President Trump on Tuesday signed into law the 2018 National Defense Authorization Act, a $700 billion defense policy bill that he said will help set in motion his promise to pursue a major military buildup.

"This historic legislation demonstrates our unwavering commitment to our men and women in uniform – the greatest fighting force in the history of the world," Trump said at the signing ceremony. "This legislation represents a momentous step in rebuilding our military and securing our future for our children."

While the act sets official policy, actual funding comes from appropriations, which Congress is still wrestling with as it faces a Dec. 22 deadline to come up with a budget deal that raises spending caps. The cap for baseline defense funding is $549 billion, well short of the $635 level set by the authorization act. The remaining $65 billion would be spent on overseas contingency operations, which is not subject to the caps.

Citing an attempted terrorist attack in New York City on Monday, Trump said the NDAA "could not come at a more opportune or important time" for U.S. military personnel.

"History teaches us that when you weaken your defense, you increase aggression," the president said Tuesday, as he thanked House Armed Services Committee Chairman Mac Thornberry, R-Texas, and several military veterans who were present for the bill's signing.

Trump also offered a rare bit of praise to Arizona Sen. John McCain for his help to ensure passage of the legislation.

"He he has fought very hard to make it just the way he wants it, and the way we all want it," Trump said of McCain, a notable critic of the president on several non-defense related issues.

Democrats have promised to push for funding increases for a handful of domestic programs when Congress returns to spending negotiations this month, in exchange for agreeing to increased military spending. Trump on Tuesday called on both parties to strike a deal that raises the cap.

"Now Congress must finish the job by eliminating the defense sequester and passing a clean appropriations bill," he said. "I think it's gonna happen. We need our military, it's gotta be perfecto."

As previously reported by the Washington Examiner, the NDAA signed by Trump on Tuesday authorizes the purchase and construction of 90 Lockheed Martin F-35 fighter jets and 14 Navy ships, authorizes $12.3 billion for missile defense operations and $1.8 billion for the training of U.S.-backed forces in Iraq and Syria, and blocks any attempt to transfer detainees from the military prison at Guantanamo Bay, among several other measures.