US President Donald Trump has said Nato is "no longer obsolete", reversing a stance that had alarmed allies.
Hosting Nato Secretary General Jens Stoltenberg at the White House, Mr Trump said the threat of terrorism had underlined the alliance's importance.
He called on Nato to do more to help Iraqi and Afghan "partners".
Mr Trump has repeatedly questioned Nato's purpose while complaining that the US pays an unfair share of membership.
The Nato U-turn wasn't Mr Trump's only change of heart on Wednesday.
In an interview with the Wall Street Journal, he said he would not label China a currency manipulator, despite having repeatedly pledged to do so on his first day in office.
At a joint press conference with Mr Stoltenberg, Mr Trump said: "The secretary general and I had a productive discussion about what more Nato can do in the fight against terrorism.
"I complained about that a long time ago and they made a change, and now they do fight terrorism.
"I said it [Nato] was obsolete. It's no longer obsolete."
But Mr Trump reiterated his call for Nato member states to contribute more funding to the alliance.
"If other countries pay their fair share instead of relying on the United States to make up the difference we will all be much more secure," said the US president.
Mr Stoltenberg thanked Mr Trump for "an excellent and very productive meeting".
Earlier this week Nato welcomed Montenegro as its 29th member nation.
The meeting at the White House comes hours after US Secretary of State Rex Tillerson met Russian President Vladimir Putin during a trip to Moscow.
"Things went pretty well. Maybe better than anticipated," Mr Trump said about that meeting.
"Right now we're not getting along with Russia at all. We may be at an all-time low in terms of relationship with Russia."