In recent months, Qatar’s neighbors have mounted a campaign against the Gulf nation for harboring extremist groups. The United Arab Emirates, for instance, has been upset with Doha for hosting an Afghan Taliban embassy.

But leaked emails released to Newsweek over the weekend show that Emirati officials lobbied their American counterparts to host the Taliban's embassy instead. Qatar opened the mission for the militant group with Washington’s blessing in 2013, in hopes of furthering the peace process in Afghanistan.

An anonymous hacker group called Global Leaks, not to be confused with the whistleblowing project GlobaLeaks, has been leaking private emails of Emirati government officials, particularly the UAE’s ambassador to Washington, Yousef al-Otaiba, to western media outlets in an apparent bid to discredit the UAE as the Qatar crisis continues.

The latest leaked exchange, dated September 12, 2011, and first published in The New York Times, shows Mohamed Mahmoud Al Khaja, director of the Foreign Minister’s office, messaging Jeffrey D. Feltman, then U.S. Assistant Secretary of State for Near Eastern affairs.

Related: Businessmen to Airlift 4,000 Cows to Qatar

“There is an article in London Times mentions that U.S. is backing setting a Taliban embassy in Doha,” Khaja wrote. “HH says that we were under the impression that Abu Dhabi was your first choice.” (HH appears to refer to his “boss,” Emirati Foreign Minister Abdullah bin Zayed Al Nahyan.) Khaja added that then United Nations envoy to Afghanistan, Staffan de Mistura, also informed the UAE that Abu Dhabi was Washington's first choice to host the embassy.

Feltman had sent an earlier email saying that Marc Grossman, then Washington’s Special Representative for Afghanistan and Pakistan, “saw Yousef al-Otaiba today, and I understand this came up. Marc said he explained to Yousef.” The email indicates the Americans acknowledged the battle between the Gulf rivals over the embassy.

In 2011, around the time the emails were sent, the Obama administration was keen to secure a peace agreement, or the beginnings of one, between the Taliban and the Afghan government as it sought to remove NATO troops from the country after a decade of conflict. Most of the troops eventually withdrew at the end of 2014—but peace has proven more elusive.

The U.S. State Department said in an email to Newsweek that “as a matter of policy," that it "does not comment on allegedly leaked documents.” The UAE Foreign Ministry did not immediately respond to a request for comment.

The hacker group Global Leaks told Newsweek: “This mail is the proof of biggest hypocrisy in [the] Qatar crisis.”

The fight over the embassy is part of wider regional tit-for-tat between gas-rich Qatar and a bloc of fellow Sunni nations led by Saudi Arabia, which has cut diplomatic and transportation links with its smaller neighbor. The rift began when an article appeared on Doha’s state news agency in May attributing comments to Qatari emir Sheikh Tamim bin Hamad Al Thani that praised Iran, Israel and Lebanese Shiite militia group Hezbollah. Qatar says the site was hacked, but Saudi media continued to spread the comments, and the bloc outlawed Qatari news websites. Saudi Arabia, Egypt, Bahrain and UAE eventually cut the links to Doha on June 5, accusing Qatar of supporting “terrorism.” Iran and Turkey, however, continued to deal with the beleaguered Sunni nation.

On July 17, on Twitter, Otaiba denied a Washington Post report saying the UAE orchestrated the alleged hack on Qatar's state news site. He went on to condemn Doha for its links to the Taliban, which is waging a deadly insurgency against the Afghan government. “What is true is Qatar’s behavior. Funding, supporting, and enabling extremists from the Taliban to Hamas & Qadafi,” he said.

On Al Jazeera, the news site that Doha significantly funds, the Qatari government last month defended its decision to host the embassy after President Donald Trump accused the country of funding “terrorism at a very high level.” Qatar denies that it funds extremist groups, but admits that it hosts them to facilitate dialogue. It says the same of its political office for the Hamas, the Palestinian militant group that rules the Gaza Strip.

The Taliban office, whether it was based in Doha or Abu Dhabi, has not led to peace in Afghanistan. It temporarily shut its doors just a month after opening in June 2013 after it held a flag-raising ceremony celebrating the “Islamic Emirate of Afghanistan.” The move angeered then Afghan President Hamid Karzai who felt it presented the Taliban as a government in exile.

Though it once wanted to host the Taliban, today the UAE criticizes Doha for hosting the embassy. Last week, for instance, Otaiba continued slam Qatar over the Taliban connection on The Charlie Rose Show. “I don’t think it is a coincidence that inside Doha…you have a Taliban embassy,” he said. “Why they do that, we don’t have an answer.”