Richard Grenell, an outspoken Donald Trump loyalist, has officially stepped down as US ambassador to Germany, ending a controversial two-year stint in Berlin that fanned transatlantic tensions, according to AFP.

A rising star in Republican circles and one of the most high-profile gays in the Trump administration, Grenell had been tapped in February to temporarily become head of US intelligence.

“Ambassador Grenell resigned from his post and the State Department on June 1,” embassy spokesman Joseph Giordono-Scholz told AFP.

The envoy had already indicated he would not be returning to Berlin once the interim role in Washington was over. He will remain the US special envoy for Kosovo-Serbia negotiations.

The 53-year-old will be remembered in Germany for his undiplomatic approach to foreign policy, often turning to Twitter to attack Chancellor Angela Merkel’s government.

He regularly angered his host country with criticism of everything from the Iran nuclear deal to Berlin’s defence spending and relations with Chinese tech firm Huawei.

A staunch supporter of Trump’s “America First” stance, Grenell faced calls for his expulsion soon after starting the job when he stated his ambition to “empower other conservatives throughout Europe”.

The envoy ruffled feathers again when he slammed German plans to lower military spending as “unacceptable” and “a worrisome signal”.

That led senior German lawmaker Carsten Schneider from the centre-left Social Democrats to label Grenell a “total diplomatic failure”, while other politicians called for him to go.