Sir Kim Darroch resigned as Britain’s ambassador to the U.S. this week after President Donald Trump blasted him for leaked memos showing he told London that Trump was “inept” and “dysfunctional.” But another powerful ambassador who slammed the president in private remains a close ally of the Trump administration.

Yousef Al Otaiba, the well-connected envoy from the United Arab Emirates, has been in frequent contact with the president’s son-in-law and adviser Jared Kushner, and his country is an important node in the Trump team’s controversial relationship with Prince Mohammed bin Salman of Saudi Arabia.

In 2016, however, Otaiba repeatedly bashed Trump in conversations with associates, including an aide to President Barack Obama, according to personal emails obtained and independently verified by HuffPost.

“How/why is this happening??” Otaiba wrote to then-White House Middle East official Rob Malley on the night of the election. “On what planet can trump be a president??”

Months earlier, he told Fox News personality and former New York Times reporter Judith Miller that paying attention to the then-Republican nominee wasn’t worth it.

“The 7 minutes I spent reading this was the equivalent of watching 7 minutes of donald trump. A waste of my time,” Otaiba wrote on May 9, 2016, in response to material Miller sent him that appeared to show Saudi disdain for his boss, Crown Prince Mohammed bin Zayed of Abu Dhabi.

HuffPost published the comments on June 5, 2017, after a still-unknown leaker or leakers shared messages from Otaiba’s inbox with multiple outlets, including The New York Times and The Intercept, amid a spat between the UAE and the neighboring nation of Qatar.

Otaiba did not respond to HuffPost’s request for comment at the time and did not do so for this story, either.