President Trump announces his decision on June 1 that the United States will withdraw from the Paris Climate Agreement. (Kevin Lamarque/Reuters)

The No. 2 diplomat at the U.S. Embassy in Beijing resigned Monday, telling staff his conscience would not permit him to formally notify the Chinese that the United States is withdrawing from the Paris climate accord.

David H. Rank, a career Foreign Service officer of 27 years, had been acting ambassador until former Iowa governor Terry Branstad (R) was confirmed as the new ambassador last month. Rank held a town meeting with embassy employees to explain he had offered his resignation and it had been accepted.

As the head of the embassy until Branstad arrives, it was Rank’s responsibility to deliver a formal notification of the U.S. intention to withdraw from the climate pact.

According to a State Department official, who spoke on the condition of anonymity to be more candid, Rank was unwilling to deliver the demarche.

He told his staff that as “a parent, a patriot and a Christian,” he could not in good conscience play a role in implementing President Trump’s decision to withdraw, according to a colleague familiar with Rank’s comments.

(Meg Kelly/The Washington Post)

Rank’s resignation was a display of the diplomatic unease over Trump’s decision to exit the Paris accord. Under the Obama administration, climate change was incorporated into the daily business of diplomacy at every level, and Rank was known for his personal concern about the environment. Career diplomats like Rank have been overseeing embassies around the world because of how slowly the Trump administration has been nominating political appointees as ambassadors.

“Mr. Rank made a personal decision,” said a spokeswoman for the East Asian and Pacific Affairs Bureau. “We appreciate his years of dedicated service to the State Department.”

Rank did not immediately respond to a request for comment. His resignation was first reported by John Pomfret, editor at large at SupChina.

Adding to the awkwardness, over the weekend another career diplomat broke ranks with Trump after he criticized London Mayor Sadiq Khan for suggesting there was “no reason to be alarmed” by armed police patrols in the city. A few hours later, Lewis Lukens, the acting ambassador at the U.S. Embassy in Britain, used the embassy’s Twitter account to say Khan had shown “strong leadership” in responding to the London Bridge terrorist attack.

Foreign Service officers take pride in putting their personal politics aside and representing their country, under both Republican and Democratic presidents, making this type of resignation unusual.

The State Department moved swiftly to replace Rank, informing the Chinese Foreign Ministry that Jonathan Fritz would be the new charge d’affaires, the deputy who heads the mission in the ambassador’s absence. Branstad is undergoing diplomat training, and has not arrived yet.

Rank, who speaks Mandarin Chinese, French, Dari and Greek, was a China hand who was on his fourth tour in China. Before that, he had been a political counselor at the U.S. Embassy in Kabul and director of the State Department’s Office of Afghanistan Affairs.

Dan Feldman, who was the special representative for Afghanistan and Pakistan when Rank was a senior adviser there, said Rank was the quintessential nonpolitical diplomat.

“I couldn’t tell you what his politics were until now,” he said. “I don’t remember having a political conversation with him in which he espoused issues or concern about anything other than serving the president, and the secretary of state, whomever they may be, and the interests of the American people.”

Although Rank told his staff he had expected to retire by the end of the year, being acting ambassador for a large and important embassy like the one in Beijing would have put him in line to become ambassador in another, smaller country.

Simon Denyer in Beijing contributed to this report.