Mr Trump was responding to French President Emmanuel Macron's suggestion of building a European army (Picture: PA).
The US President has said that France were "starting to learn German" before the involvement of the United States in World Wars One and Two.
Donald Trump was posting on Twitter in response to French President Emmanuel Macron's suggestion of building a European army to protect the continent from the US, China and Russia.
Mr Macron argued that Europe should build up its military forces because it can no longer depend on America for defence.
Mr Trump tweeted: "Macron suggests building its own army to protect Europe against the U.S., China and Russia.
"But it was Germany in World Wars One & Two - How did that work out for France?
"They were starting to learn German in Paris before the U.S. came along. Pay for NATO or not!"
Mr Trump and Mr Macron met on Saturday at the Elysee Palace and discussed defence, trade and other issues.
A top adviser to Mr Macron said the French position has been "clarified".
The official said Mr Macron explained the European army issue to Mr Trump, stressing that France was not making a choice between a European defence mechanism and multilateral organisations such as NATO.
Yesterday, the US President tweeted that other nations should "pay the United States for its great military protection, or protect themselves".
Mr Trump has on multiple occasions in the past complained that NATO countries do not pay their fair share of the defence alliance's expenses.
In July, the US President backed down over threats to pull the US out of the alliance after other leaders agreed to increase defence spending "like they never have before" and stated his belief that "4% [of GDP] is the right number" for nations to spend on defence.