Image copyright Reuters Image caption Mr Rank (centre), seen here in March, was the deputy chief of mission at the Beijing embassy

A top diplomat at the US embassy in Beijing has stepped down, apparently because he disagreed with President Donald Trump's climate change policy.

The state department said Deputy Chief of Mission David Rank had resigned.

US media outlets say he stepped down over Mr Trump's controversial announcement last week that the US was withdrawing from the Paris agreement.

The US embassy in Beijing told the BBC it was Mr Rank's personal decision and his years of service were appreciated.

Before becoming president, Mr Trump had said climate change was a hoax created by China to undermine US manufacturing.

He has said withdrawing the US from the 2015 Paris agreement - under which 188 countries committed to limiting rises in global temperatures - would protect the US economy.

But his decision to do so last week was met with much criticism worldwide.

Media playback is unsupported on your device Media caption President Trump says the Paris climate accord "disadvantages" US

The New York Times quoted unnamed friends of Mr Rank as saying he was deeply frustrated about the US policy toward China, particularly regarding climate change.

The embassy in Beijing did not comment on reports that he had told embassy staff he could not defend the decision and did not want to present formal notification to Chinese authorities.

Image copyright Twitter / @JEPomfret

Mr Rank joined the state department in 1990 and had previously served in Afghanistan, Taiwan, Greece and Mauritius, according to his profile page which was still on the Beijing embassy's website as of Tuesday.

Appointed in January 2016, he was effectively the top US diplomat in China as he was also the acting ambassador. Terry Branstad, who was selected by Mr Trump for the post, fills that position later this month.

The state department said the embassy's economics councillor Jonathan Fritz would be filling in behind Mr Rank immediately.