President Trump signed the National Defense Authorization Act (NDAA) Tuesday afternoon at the White House, approving spending levels for U.S. military efforts. The House and the Senate passed the $700 billion bill for fiscal year 2018 in mid-November.

"This legislation represents a momentous step toward rebuilding our military and securing the future for our children," Mr. Trump said. "I applaud the work of the members of both parties who came together to pass the National Defense Authorization Act, which passed with overwhelming bipartisan support— something that sounds very nice to my ears."

The legislation establishes spending levels and policies for the Department of Defense -- around $626 billion for the base budget. It sets spending levels for overseas contingency operations -- which includes funding for the fight against ISIS -- at about $66 billion. The defense budget calls for an increase in the size of the armed forces and the salary of existing members, improvements in missile defense capabilities and upgrades to combat vehicles among other military initiatives. However, this NDAA exceeds the spending caps set by the 2011 Budget Control Act to keep deficits under control, and lawmakers could have a fight ahead about how to fund the bill, which exceeds the 2018 budget cap of $549 billion by $150 billion.

Get Breaking News Delivered to Your Inbox

While introducing the legislation, Mr. Trump referenced the attempted suicide bombing in New York City Monday morning, calling for an end to the "chain migration" system through which suspect Akayed Ullah, 27, entered the United States. Ullah, who is originally from Bangladesh, entered the country with his family in February 2011 on an immigrant visa, and became a legal permanent resident of the United States.

The president also cited an earlier New York City terror attack on Halloween that killed eight people and injured an additional 12. The suspect in that attack entered the country through the diversity visa lottery program.

"We're going to end both of them. The lottery system and chain migration. We're going to end them. Fast," Mr. Trump said.

In light of both attacks, Mr. Trump stressed the importance of the NDAA.

"These attacks underscore the dangers we face from around the globe, the National Defense Authorization Act could not come at a more opportune or important time," he said.

He also called on congressional Democrats to support a spending bill that would provide the military with more resources. Democrats are likely to argue for more funding for non-defense priorities.

"At this time of grave global threats I urge Democrats in Congress to drop their shutdown threats and to send clean funding, and a clean funding bill to my desk that fully funds our great military," he said.

At the end of his remarks, the president signed the bill and shook hands with Secretary of Defense James Mattis and Vice President Mike Pence.

"We need our military, it's gotta be perfecto," Mr. Trump said.