On Friday, President Donald Trump again roasted one of the US's closest allies on Twitter.

Trump was responding to French President Emmanuel Macron saying Europe needed its own army.

Macron went a step further, saying one of the foes Europe may need defense against was the US.

President Donald Trump lashed out at French President Emmanuel Macron on Friday, lambasting the French leader for saying that European countries needed to establish their own military force for defense against Russia, China, and the US.

"President Macron of France has just suggested that Europe build its own military in order to protect itself from the U.S., China and Russia," Trump tweeted on Friday. "Very insulting, but perhaps Europe should first pay its fair share of NATO, which the U.S. subsidizes greatly!"

Trump was responding to comments from Macron on Tuesday, when, during a visit to Verdun — site of one of the longest and bloodiest battles of World War I — he said Europeans could not be defended without a "real European army."

Macron's remarks came a few days before Trump was scheduled to arrive in Europe to mark the centenary of the November 11 armistice that ended World War I.

Andrew Harnik/AP

Macron's proposal seems to align with Trump's exhortations for European countries to spend and do more to support their defense — which he has punctuated with sharply worded letters to several European leaders.

But Macron continued his comments on Tuesday by naming the US as one of the actors against which Europe may have to defend itself.

"We have to protect ourselves with respect to China, Russia and even the United States of America," Macron said on French radio.

Tensions between European countries and Russia have risen steadily in recent years, particularly after Moscow's annexation of Crimea and intervention in Ukraine. China's involvement in European infrastructure and investments in the continent, while limited, is seen by some as a growing threat in light of the "debt-trap diplomacy" that Beijing has been accused of practicing in Asia.

Tensions with the US are relatively new for Europe, however. Since his campaign, Trump has expressed disdain for the NATO alliance, of which the US is a founding member.

As in his tweet Friday, the US president has criticized NATO's European members not meeting the 2%-of-GDP defense-spending goal the alliance agreed to in 2014, though they agreed it did not need to be met for a decade.

German Chancellor Angela Merkel, NATO Secretary General Jens Stoltenberg, President Donald Trump and other NATO leaders at the opening ceremony at the 2018 NATO Summit in Brussels, July 11, 2018. Sean Gallup/Getty Images

Trump has accused European countries of not paying their "fair share" toward NATO, though alliance members do not pay into a common pool for defense. (Each member does make a contribution to NATO's relatively modest direct budget.) Previous US administrations made similar criticisms of other NATO members, though Trump is much more strident.

Trump has also undermined NATO in other ways. Earlier this year, he questioned the admission of Montenegro, the alliance's newest member, and suggested the US may not act to defend the Balkan country as required by NATO's collective-defense provision, Article 5.

While others have criticized NATO's expansion since the end of the Cold War, Trump's comments were seen by many as more damaging because they suggested NATO's most powerful member would not adhere to the alliance's founding purpose.

Hours after Macron spoke Tuesday, European Commission chief Jean-Claude Juncker, long a vocal supporter of such a force, said an EU army was likely to be formed one day. Many in Europe are wary of such a force, however, out of concerns it could undermine NATO.

On Wednesday, the French-led European Intervention Initiative was launched after months of negotiations with Germany, which Paris wanted as a main part of the force.

While many were skeptical of the initiative when Macron first proposed it a year ago, Trump's remarks and the looming British exit from the EU boosted support for it. Its 10 members will eventually collaborate on planning, on analyzing military and humanitarian crises, and on military responses to those crises.