US President Donald Trump speaks to reporters onboard Air Force One. Picture: Manuel Balce Ceneta/AP

Helsinki — The US ambassador to Estonia says he has resigned over frustrations with President Donald Trump's comments about the European Union and the treatment of Washington's European allies.

In a private Facebook message posted Friday, James D. Melville wrote: "For the President to say EU was 'set up to take advantage of the United States, to attack our piggy bank,' or that 'NATO is as bad as NAFTA' is not only factually wrong, but proves to me that it's time to go."

Melville is a senior U.S. career diplomat who has served as the American ambassador in the Baltic nation and NATO member of Estonia since 2015. He has served the State Department for 33 years.

The US Embassy in Tallinn did not immediately comment.

AP