"I said it was obsolete," Trump said. "It's no longer obsolete."

Trump, who consistently criticized NATO during his presidential campaign, on Wednesday said the "great alliance" of the U.S. and NATO will work with a "common devotion to human dignity and freedom" to defeat the world's challenges, "of which there will be many," CBS News reported.

The two in private were expected to discuss Russia and Syria, along with Ukraine, and the fight against ISIS.

Read alsoTillerson: Donbas conflict in Ukraine to remain obstacle in U.S.-Russia relationsAt this point, the greatest question facing NATO is what to do with Syrian president Bashar al-Assad, believed to be responsible for a deadly chemical attack on Syria last week, and Russia, which has resisted any international intervention in Syria. Trump's appearance with Stoltenberg came soon after Secretary of State Rex Tillerson held a press conference with Russian foreign minister Sergey Lavrov, in which the two disagreed on virtually everything. Moments before the Trump-Stoltenberg news conference, a UN Security Council resolution calling for an investigation into the Syria chemical attack failed – killed by a Russian veto.

"We may be at an all-time low in terms of our relationship with Russia," said Trump, who has been careful not to criticize the Kremlin.

Read alsoTrump describes situation in Donbas as 'crazy'The president said it would be "fantastic" to get along with Russia and its president, Vladimir Putin, but he isn't sure if that's possible. Stoltenberg, meanwhile, emphasized that a strong NATO and a strong Russia can exist simultaneously.

"We don't want a new Cold War," Stoltenburg said. "We don't want a new arms race."

Trump also stood behind the missile strike he ordered on a Syrian airbase last week, calling Assad a "butcher," and saying striking back was the right thing to do.

Stoltenberg avoided criticizing or praising the U.S. air strike, saying the action was met with a "lot of understanding" at the UN.

Read alsoRussian bombers hit Syria's Idlib, casualties reported – media"Any use of chemical weapons is unacceptable and cannot go unanswered, so those responsible must be held accountable," Stoltenberg said. The NATO secretary general did praise Trump for his push to have other nations move towards a 2% GDP defense spending goal.

"We are all seeing the effects of your strong focus on burden sharing in the alliance," Stoltenberg told Trump.

Trump said the "nasty" world will look different by the time his presidency comes to an end. 

"By the time I'm finished, it's going to be a lot better place to live in," Trump said. "Because right now, it's nasty."