MAINZ, Germany — Washington could withdraw some troops from Germany unless Chancellor Angela Merkel's government answers repeated calls to boost its defense spending, the U.S. ambassador has warned.

“It is actually offensive to assume that the U.S. taxpayer must continue to pay to have 50,000-plus Americans in Germany, but the Germans get to spend their surplus on domestic programs,” Ambassador Richard Grenell told the German press agency dpa.

The embassy's official Twitter account Friday posted a similar statement.

The U.S. envoy to Poland, Georgette Mosbacher, on Thursday suggested relocating U.S. troops from Germany to Poland. Grenell told dpa that he agreed with her comments.

.@USAmbPoland: “Poland meets its 2% of GDP spending obligation towards NATO. Germany does not. We would welcome American troops in Germany to come to Poland.” https://t.co/kUfedr176p — US Embassy Warsaw (@USEmbassyWarsaw) August 8, 2019

"President Trump is right and Georgette is right," Grenell told dpa. "Multiple presidents have asked the largest economy in Europe to pay for their own defense.”

German officials did not immediately respond to the ambassador's comments.

The interview received widespread media attention in Germany.

President Donald Trump has frequently and publicly criticized NATO members that have failed to hit a target of spending 2 percent of their gross domestic product on defense. He has been particularly scathing about close ally Germany, as well as Merkel personally, and has argued it is not fair to American taxpayers that Germany buys oil and gas from Russia while enjoying the umbrella of defense provided by U.S. dollars.

According to the United States European Command in Stuttgart, some 35,000 U.S. troops and an estimated 17,000 civilian U.S. personnel are stationed in Germany at five U.S. Army garrisons that include multiple installations and two Air Force main operating bases throughout the country.

The remarks from Mosbacher and Grenell come ahead of a visit by Trump to Poland, scheduled for September.

The German defense ministry told NBC News that plans had been announced in June to raise the NATO defense spending budget for the year 2020 to a total of €44.9 billion ($50.3 billion). By comparison to 2018, this would be an increase of €6 billion ($6.72 billion) and amount to 1.35 percent of Germany’s GDP.

But, while the increase would be the largest for Europe’s strongest economy since the end of the Cold War, it would still fall far short of Merkel’s pledge last year to meet NATO’s 2 percent spending target within the coming years.

In an interview with the German daily newspaper Frankfurter Allgemeine Zeitung, Germany’s new defense Minister Annegret Kramp-Karrenbauer last month said that Germany has given "a clear commitment" to increase military spending in order to reach the 2 percent target.

This "cannot be achieved overnight," Kramp-Karrenbauer added, but said that it is clear that Germany "will have to continue on the path" to achieve the goal.