Donald Trump has said Nato is no longer obsolete in an about-turn on previous comments that the military alliance no longer served a purpose.

The US President, who is hosting the Nato secretary-general for talks in Washington, thanked the member states of the bloc for condemning the Syria chemical attack.

But he also said they were still not paying their fair share of the Nato budget and told Jens Stoltenberg he would be seeking to claw back money from states that he said had underpaid in the past.

"I said it was obsolete. It's no longer obsolete," Trump said, adding that the transatlantic alliance was adapting to the broader mission against Isis.

Mr Trump thanked Nato members for their support of his decision last Thursday to launch 59 cruise missiles at a Syrian airfield in retaliation for a chemical weapons attack on civilians and said it was time to end Syria's civil war.

Mr Stoltenberg said he had an excellent and productive meeting in the Oval Office with Trump.

James Mattis says Putin's threat to Nato is biggest threat since WWII

As a candidate in the presidential election, Mr Trump said the 28-member organisation had outlived its usefulness.

Since taking office, he has expressed support for Nato but has reinforced his view that European members must meet a 2014 agreement for member countries to boost defense spending to 2 per cent of GDP within a decade.

Only the US and a handful of other countries are meeting the target.