Nato members have seen “serious differences before”, the secretary general of the alliance has said after Donald Trump appeared to lash out at allies.

Following the G7 summit in Canada, which Prime Minister Theresa May admitted had been “difficult”, the American president tweeted to state that the US “pays close to the entire cost of Nato”.

Speaking to the Press Association, Jens Stoltenberg appeared to dismiss concerns that Mr Trump has left the 29-member alliance in crisis after his scathing social media rant.

“There are differences among nations on important issues, such as trade, the Iran deal, or climate change – these differences are real,” he said.

“But we have seen serious differences before, dating back to the Suez crisis in 1956, or the Iraq War in 2003.

“Despite our differences, Nato has proven again and again that we unite around our core task, we defend each other.

“And we continue to deliver – strengthening of our collective deterrence and defence, stepping up in the fight against terrorism and working together addressing other threats such as cyber.

“In Nato, allies have always been able to agree on the fundamentals – standing together and protecting one another.

“This has helped keep our people safe for almost 70 years.”

During his Twitter tirade, Mr Trump claimed that America protects many of the countries that “rip off” the US on trade, and highlighted that Germany spends 1% of GDP on defence while America hits 4%.

Mr Trump said the US protects Europe at “great financial loss” and then gets “unfairly clobbered on trade”, warning that “change is coming”.

Britain currently only just meets the Nato target – with a total spend of GDP on defence topping 2.1% – but critics have claimed this figure is inflated by items such as pensions.

Asked whether he foresees President Trump pulling out of Nato, Mr Stoltenberg said the commitment of the US to the alliance “remains iron-clad with both words and in deeds”.

“US forces in the eastern part of our alliance are enhancing our deterrence and defence,” he said.

“The United States is investing billions of dollars in its military presence in Europe, including a further increase in funding for the European Deterrence Initiative.

“The amount of funding for these forces has increased by 40% during the Trump administration, and the US will host our new command for the Atlantic – to help protect the sea lines of communication between Europe and North America.

“This is a clear demonstration of US determination to stand with her European allies.

“Nato is founded on the bond between Europe and North America.

“In good times and bad, that bond has been unbreakable. We stand together and defend each other. A strong Nato is good for Europe and good for North America.”

The next Nato summit will take place on July 11-12 in Brussels, where issues including defence, deterrence, the fight against terrorism, the readiness of forces, and modernising the alliance are expected to be addressed.