Senior US diplomats driven to dissent, resign under President Trump A new form of dissent has emerged: retirement.

 -- The No. 2 official at the U.S. Embassy in Beijing has resigned his post over President Trump's decision to withdraw from the Paris Climate Accord, ABC News has confirmed, making him the latest senior diplomat to express dissent or retire unexpectedly under the Trump administration.

David Rank was the charge d'affaires in Beijing, leading the embassy while Trump's pick, former Iowa Gov. Terry Branstad, who was confirmed last month, prepares for his post. He told colleagues and staff that he could not continue to serve, including his responsibility to formally notify China of the withdrawal.

A State Department official confirmed Rank's departure but wouldn't comment on the circumstances.

"Mr. Rank made a personal decision. We appreciate his years of dedicated service to the State Department," the official told ABC News.

The news of Rank's resignation follows a dust-up over some tweets from the charge d'affaires at the U.S. Embassy in London. Lewis Lukens is the top U.S. diplomat in the U.K. because the Trump administration has not yet nominated an ambassador. On Sunday, he tweeted his support for London Mayor Sadiq Khan and his condolences after the terror attack there.

That's standard procedure in the aftermath of an attack but it stood in sharp contrast to Trump's bashing Khan for his response to the attack. The disparity drew accolades and jeers from opponents and supporters of the president, respectively.

But State Department spokesperson Heather Nauert defended Lukens’s tweets at her first press briefing Tuesday, saying diplomats abroad are “professionals … entitled to use social media.”

“We expect them to use it responsibly,” she added, saying no one at the White House had any issue with Lukens’s tweets.

U.S. Ambassador to Qatar Dana Shell Smith also seemed to counter the president’s message this week.

As the diplomatic crisis with Qatar emerged, Smith tweeted a statement from the fall from the U.S. Embassy in Doha, praising Qatar’s efforts to combat terrorist financing -- a sharp contrast from Trump’s tweets accusing the Qataris of terror financing.

Smith is no stranger to ruffling feathers. Earlier in May, she tweeted that it was "increasingly difficult to wake up overseas to news from home, knowing I will spend today explaining our democracy and institutions."

Smith declined to publicly comment on the tweet, but she stood by it in a second message: "Diplomats explain & defend our political system.Can be tough when partisan acrimony so high, but there is still no greater country."

What's unusual is having career foreign service officers, who are tasked with implementing U.S. foreign policy for administrations of either party, regardless of their politics, speak out so publicly. That's partly a sign of the times -- the age of Twitter diplomacy and personal social media -- but also a sign of growing dissent in the ranks.

Indeed, the State Department does have an official, private channel for this very purpose, so diplomats can send dissent cables when they strongly oppose a particular policy.

ABC News was first to report that the dissent channel was used in January to express opposition to Trump's original travel ban executive order. That cable was signed by over 1,000 employees around the globe.

In the past couple of months, a new form of dissent has emerged, too: retirement. A handful of senior diplomats with years of experience have retired, even as many top roles at the State Department remain unfilled by the Trump administration.

Among those is the top U.S. diplomat for the Middle East, acting assistant Secretary of State for Near Eastern affairs and former ambassador to Iraq Stu Jones, who is leaving with his decades of experience in Middle Eastern policy at a time when the challenges to the region and the confusion about America's agenda are both great.

Jones went viral last week for his lengthy, thoughtful pause during a State Department briefing, quiet for nearly 20 seconds as he contemplated a question of why the U.S. criticizes Iran about democracy, but not Saudi Arabia.

Jones joins other career folks like Dan Fried, the longest-serving diplomat who retired at the end of February and delivered a firm rebuke of Trump's "America First" policy in a retirement speech, his words republished across the internet.

"For those of you remaining in government service, I say this: Serve your nation and this administration as you serve all administrations: with loyalty, dedication and courage," he said. "And as you serve, you will, as I did, always remember your oath to the Constitution."