File photo: U.S. Ambassador to Estonia James D. Melville Jr. addresses dignitaries in front of an U.S. Army tank, at a hand-over ceremony of the upgraded NATO military base in Tapa, Estonia, Dec. 15, 2016. (AP photo)
The US ambassador to Estonia, James Melville, will retire from the State Department next month, a move he reportedly said was prompted by Donald Trump's jibes and treatment of European allies.
The announcement comes ahead of a summit in Brussels of NATO allies on July 11-12, which has been clouded by Trump's claims that Europe is exploiting the United States by underspending on defense.
The US embassy in Tallinn said the career diplomat would retire after finishing his three-year assignment in Estonia in late July.
But in a private Facebook post first reported by Foreign Policy, Melville said frustration over Trump's barbs had made him decide "it was time to go."
Trump reportedly recently told fellow western leaders that the NATO alliance was "as bad as NAFTA" -- a North American trade deal that he has threatened to tear up.
"A Foreign Service Officer's DNA is programmed to support policy and we're schooled right from the start, that if there ever comes a point where one can no longer do so, particularly if one is in a position of leadership, the honorable course is to resign," Melville's post said, according to the magazine.
"Having served under six presidents and 11 secretaries of state, I never really thought it would reach that point for me," said Melville, who has spent 33 years in the foreign service.
"For the President to say the 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," he reportedly wrote in his post.
Urmas Paet, a former Estonian foreign minister who is now a member of the European Parliament, wrote in a press statement that Melville resigning is "another example of people who spent decades building up the relationship between Europe and USA being unable to put up with the force with which Trump is breaking apart cooperation in the democratic world."
Another Estonian ex-foreign minister, Marina Kaljurand, told state broadcaster ERR that Melville's planned departure had been known for a year but he decided to resign a little earlier than planned.
"From a human point of view I can understand perfectly that it's very hard or practically impossible to represent a country when you don't share its views, when you have to say what you think isn't true," Kaljurand said.
"And I think that he has behaved in a very honest and honorable way."
Also late Friday, fellow career diplomat Susan Thornton -- whom Trump had tapped as assistant secretary for East Asian affairs -- declared she would retire, according to CNN.
Melville's announcement follows the resignation of several other senior envoys over differences with the Trump administration, including the US ambassador to Panama John Feeley and Elizabeth Shackelford, a prominent US diplomat who was based in Nairobi.
Trump's administration was quick to dismiss the ambassadors who served under his predecessor, but has been slow to refill the diplomatic roster.
His first secretary of state, former oil executive Rex Tillerson, clashed with the White House over nominees and the administration struggled to fill posts.
Tillerson has now been replaced by former CIA chief Mike Pompeo, who has promised to bring some "swagger" back to US diplomacy and now the pace of appointments has picked up.