President Trump is "fully committed" to NATO's collective defense, even though the president didn't explicitly pledge to support it during his speech at NATO headquarters, White House press secretary Sean Spicer said Thursday.

The NATO treaty's Article 5 states that an attack against one country is considered an attack on all in the alliance.

"We're not playing cutesy with this," Spicer told reporters on Air Force One. "He's fully committed."

Trump's speech drew criticism from people like Ben Rhodes, who served as a foreign policy adviser to former President Barack Obama.

"Article 5 is cornerstone of NATO," Rhodes tweeted. "In addition to saying the words, Obama Admin worked to do contingency planning for defense of all allies."

He added: "Our allies invoked article 5 after 9/11 and have fought and died in Afghanistan for years to keep that pledge."

Spicer pointed out to reporters that Trump mentioned Article 5 at the beginning of his speech.

"At the beginning he talked about it being invoked right after 9/11, but, second of all, the entire ceremony was called an Article 5 dedication," Spicer said.

During his remarks, Trump said: "This ceremony is a day for both remembrance and resolve. We remember and mourn those nearly 3,000 innocent people who were brutally murdered by terrorists on Sept. 11th, 2001. Our NATO allies responded swiftly and decisively, invoking for the first time in its history the Article 5 collective defense commitments."

Trump also told NATO members they must "contribute their fair share" so the alliance can focus on ways to fight terrorism and deal with immigration crises.

"These grave security concerns are the same reason that I have been very, very direct with Secretary [Jens] Stoltenberg and members of the alliance in saying that NATO members must finally contribute their fair share and meet their financial obligations," Trump said.

Spicer said Thursday that NATO countries agreed to commit 2 percent of their GDP to defense.

"Right off the bat, there was unanimous support for a resolution to commit to burden sharing and combating terrorism, which are two things the president talked about during his campaign and now as president," Spicer said. "To see unanimous support for the two main priorities of the president, and the secretary general was praiseworthy of the president's effort, was a great way to start it off."