Husain Haqqani, right, with Pakistani President Asif Ali Zardari. (B.K. Bangash — Associated Press)

The resignation of the envoy, Husain Haqqani, follows an uproar over a confidential memo that requested Washington’s help in forestalling a military coup and diminishing the power of the Pakistani army in the aftermath of the U.S. raid to kill Osama bin Laden in Pakistan.

In recent days, a Pakistani-American businessman has said he penned the memo on the instructions on Haqqani.

Haqqani, a prominent figure in Washington’s diplomatic scene, has denied writing or delivering the memo, which was unsigned. Adm. Mike Mullen, the former chairman of the Joint Chiefs of Staff, has said he never took the memo seriously.

But the furor has mounted in Pakistan over the past week as the army, which has long viewed Haqqani as an untrustworthy intimate of Americans, demanded an explanation and opposition parties said he should be tried for treason.

In a statement Tuesday, Haqqani said he was resigning to “bring closure to this meaningless controversy threatening our fledgling democracy.”

“To me, Pakistan and Pakistan’s democracy are far more important than any artificially created crisis over an insignificant memo written by a self-centered businessman,” he said. “I have served Pakistan and Pakistani democracy to the best of my ability and will continue to do so."

The controversy had threatened to reach the offices of President Asif Ali Zardari, an unpopular leader who counts Haqqani as a close ally.

Haqqani arrived Sunday in Islamabad to face questions from military and civilian leaders, and Prime Minister Yousuf Raza Gilani announced Tuesday night that he had asked Haqqani to resign so that a “detailed investigation” could be carried out.

A Gilani spokesman said it was “necessary in national interest to formally arrive at the actual and true facts.”

Haqqani, via Twitter, said he had asked Gilani to accept his resignation and has “much to contribute to building a new Pakistan free of bigotry & intolerance. Will focus energies on that.”