WASHINGTON (Reuters) - David Rank, the chargé d’affaires of the U.S. Embassy in Beijing, has left the State Department over the Trump administration’s decision to quit the 2015 Paris agreement to fight climate change, a senior U.S. official said on Monday.

An official of China's Giant Panda Protection and Research Center introduces Dujiangyan Panda Base to David Rank (C), the charge d'affaires of the U.S. Embassy in Beijing, in Sichuan province, China March 24, 2017. Picture taken March 24, 2017. REUTERS/Stringer

A State Department spokeswoman confirmed Rank’s departure, but said she was unable to verify Twitter posts that said he resigned as he felt unable to deliver a formal notification to China of the U.S. decision last week to quit the agreement.

“He has retired from the foreign service,” said Anna Richey-Allen, a spokeswoman for the department’s East Asia Bureau. “Mr. Rank has made a personal decision. We appreciate his years of dedicated service to the State Department.”

Iowa Governor Terry Branstad, President Donald Trump’s pick as the next U.S. ambassador to Beijing, is expected to take up the post later this month.

A tweet from China expert John Pomfret quoted unnamed sources as saying that Rank had resigned as he could not support Trump’s decision last week to withdraw from the Paris agreement.

Another tweet from Pomfret said Rank called a town hall meeting to announce his decision to embassy staff and explained that he could not deliver a diplomatic note informing the Chinese government of the U.S. decision.

A senior U.S. official confirmed the account given in the tweets but added that after Rank announced his intention to retire on Monday in Beijing, he was told by the State Department to leave his post immediately. The official spoke on condition of anonymity.

On June 1, the U.S. State Department accepted the resignation of its top personnel officer, who had been among its few remaining senior Obama administration political appointees, another U.S. official said.

Arnold Chacon had served as the director general of the foreign service and director of human resources.

The official said Chacon had tendered his resignation when Trump was inaugurated on Jan. 20, along with all presidential appointees, who serve at the pleasure of the president and secretary of state.

The acceptance of Chacon’s resignation was first reported by the DiploPundit website.

It was not immediately clear whether he would be offered another post at the department.

Other than Secretary of State Rex Tillerson, his deputy John Sullivan and Undersecretary of State for Political Affairs Tom Shannon, the third-ranking U.S. diplomat, most of the State Department’s senior posts are currently vacant or filled by acting officials.

Chacon could not immediately be reached for comment.

Contacted by Reuters for comment, Rank, a career foreign service officer who took over the post of deputy chief of mission in Beijing in January 2016, referred all questions to the U.S. embassy.

Jonathan Fritz, the embassy’s economics councilor, would serve as chargé in his place, Richey-Allen said.

Rank had been with the department for 27 years and served as the political councilor at the U.S. Embassy in Afghanistan from 2011 to 2012.

Trump’s announcement on Thursday that he would withdraw the United States from the Paris climate accord, saying it would undermine the U.S. economy and cost jobs, drew anger and condemnation from world leaders and heads of industry.

“The world has paid attention to the U.S. withdrawal from the Paris agreement”, Chinese Foreign Ministry spokeswoman Hua Chunying told a regular news briefing on Tuesday, but added that personnel changes were the United States’ “internal affairs”.