Husain Haqqani, a professor of international relations at Boston University and a senior fellow at the Hudson Institute, served as Pakistan’s ambassador to the United States from 2008 to 2011.

I am saddened but not surprised that a Pakistani judicial inquiry commission has accused me of being disloyal while serving as my country’s ambassador to the United States. The tide of anti-Americanism has been rising in Pakistan for almost a decade. An overwhelming majority of Pakistanis consider the United States an enemy, notwithstanding the nominal alliance that has existed between our countries for six decades. Americans, frustrated by what they see as Pakistani intransigence in fighting terrorism in Afghanistan, are becoming less willing to accept Pakistani demands even though Pakistan has suffered heavily at the hands of terrorists.

This is a difficult time to openly advocate friendly relations between the United States and Pakistan. I am proud that I did so as ambassador. During my tenure, the United States agreed to initiate a strategic dialogue with Pakistani civil and military leaders. The idea was to overcome the episodic nature of bilateral relations: Our countries had a pattern of working together for a few years and then falling out amid complaints about each other. The strategic dialogue sought to reconcile Pakistan’s regional concerns about Afghanistan and India with U.S. global concerns about nuclear proliferation and terrorism. But the dialogue stalled last year, and a series of unfortunate incidents, culminating in Osama bin Laden being found in Pakistan last year, has brought our countries to the brink of an adversarial relationship.

My sincere efforts to transcend the parallel narratives that have shaped U.S.-Pakistani relations were not always appreciated in Pakistan, where conspiracy theories and hatred for the United States have become a daily staple of the national discourse. My detractors in Pakistan’s security services and among pro-Jihadi groups have long accused me of being pro-American; they condescendingly described me as the U.S. ambassador to Pakistan based in Washington. Falsehoods were circulated in Pakistani media about my issuing thousands of visas to “CIA spies” who would allegedly act with impunity against my country. Few considered that Pakistan was pledged record amounts of U.S. aid and that Pakistani views were being heard on a range of issues. The expectation that Washington should simply do whatever the Pakistani hyper-nationalists desire remains unrealistic.

I resigned last November after a U.S. businessman of Pakistani origin — now residing in Monaco — claimed that I had asked him to deliver a secret memo to Adm. Michael Mullen, then chairman of the Joint Chiefs of Staff, seeking U.S. help in thwarting a military coup right after the U.S. operation that killed bin Laden. The affair was dubbed “Memogate” by the Pakistani media. Our Supreme Court, pursuing a populist ideological agenda without regard to legal or constitutional niceties, intervened directly. Without any trial, it created a Commission of Inquiry and barred me from leaving Pakistan, though it later relented.

This week the commission presented its findings. It alleged that I had acted against Pakistan’s interests and had authorized the controversial memo. The report’s release has been timed to distract attention from serious allegations by a Pakistani businessman that he paid millions to the son of Pakistan’s chief justice as part of efforts to buy favors.

How ironic that Pakistani hard-liners claim I was an American agent of influence with access in Washington’s power corridors. Were that true, there would have been no reason for me to seek help, certainly not from a businessman of dubious credentials, to deliver a message to the U.S. government. The one-sided “evidence” has failed to prove my connection to the memo. I have not been charged or tried — though the report could lead to charges, and a treason conviction carries the death penalty. No, I was simply labeled guilty by a “fact-finding” commission that bent over backward to accommodate my discredited accuser.

The commission’s bias was clear in its refusal to hear from me via videoconference — a request I made in light of security threats — and its lack of interest in seeking the testimony of U.S. officials who received the controversial memo, Mullen and Gen. Jim Jones. Notably, Jones said in a sworn affidavit that I had nothing to do with the document that had been transmitted to him and that the memo reflected the ideas of its author, the American businessman Mansoor Ijaz.

The commission’s findings are motivated by politics, not law. I served Pakistan sincerely. Most people in Washington saw and know that. Branding me a traitor will not solve any of Pakistan’s myriad problems, not least of which is the prospect of international isolation. The 2012 BBC Globescan poll found that the international perception of Pakistan is as bad as that of Iran and North Korea.

It is tragic that anti-Americanism is being exploited to push ideological agendas, but I stand by my view that positive U.S.-Pakistan relations under a civilian-led Pakistani government are necessary for international peace and Pakistan’s stability. My real “crime” is standing up for U.S.-Pakistan relations for Pakistan’s sake. I had nothing to do with writing and sending that memo. But many people around the world would recognize that its contents suggesting changes in Pakistan’s counterterrorism and nuclear policies reflect reasonable views that are not treasonous and are, in fact, in line with global thinking.