Husain Haqqani, Pakistan’s ambassador to the United States, has offered his resignation to defuse a growing controversy at home that threatens to aggravate already precarious relations between that country’s powerful military and its civilian government.

In a letter sent Wednesday to Pakistani President Asif Ali Zardari, Haqqani said in an interview, he wrote that “I do not want to be a distraction from the major challenges facing our country and our government.”

The Pakistani government issued no immediate response.

Zardari had ordered Haqqani to return home this week for consultations following media reports that his government had asked for American intervention to prevent a military coup after U.S. forces killed Osama bin Laden in May.

In a commentary last month in the Financial Times, Mansoor Ijaz, a Pakistani American, wrote that an unnamed Pakistani diplomat had enlisted him to help compose a message to be transmitted, through an unidentified conduit, from Zardari to Adm. Mike Mullen, then the chairman of the Joint Chiefs of Staff.

Zardari, Ijaz wrote, “needed an American fist on his army chief’s desk to end any misguided notions of a coup — and fast.” According to Ijaz’s account, once Pakistan’s two top military officials — Gen. Ashfaq Kayani, the army chief, and Lt. Gen. Ahmed Shuja Pasha, head of Pakistan’s Inter-Services Intelligence agency — were replaced, a “new national security team” would eliminate the intelligence branch that maintained contact with the Pakistan-based Taliban and insurgents known as the Haqqani network.

In the interview, the Pakistani ambassador said he had been in contact with Ijaz “at various times during the last 10 years,” including after the killing of the al-Qaeda leader. But, he said, “I did not draft or deliver the memo, and I had no authority to conceive or authorize such a memo.”

Navy Capt. John Kirby, a Mullen spokesman, said last week that Mullen had no recollection of the memo. Kirby told Foreign Policy’s The Cable blog Wednesday that the former chairman had subsequently obtained a copy of it. “He did not find it at all credible and took no note of it then or later,” the spokesman said.

The U.S.-Pakistani relationship underwent severe strain in the wake of the bin Laden killing, and in testimony shortly before his retirement in September, Mullen publicly accused the Pakistani intelligence agency of operating the Haqqani insurgent network as a “veritable arm” of Pakistani intelligence. More recently, however, both U.S. and Pakistani officials have said that relations are returning to a more even keel.

But the fallout continues in Pakistan, where the Ijaz matter threatens to become a major crisis. Commentators have denounced both Ijaz and Haqqani for trying to enlist U.S. assistance to oust military leaders.

In his letter to Zardari, Haqqani said he was being unjustly vilified.

But Pakistan’s army leadership — which has long disdained Haqqani as too close to the Americans — is enraged by the memo, a military intelligence official sympathetic to the army’s point of view said Thursday. The official, who was not authorized to speak publicly, said the military had led its own “investigation” into the letter and pinpointed Haqqani as the unnamed diplomat.

The official said Kayani, in meetings with Zardari earlier this week, was the one who demanded Haqqani return to Islamabad to explain his role in the saga. This claim could not be immediately confirmed.

The army “wants to see the back of Haqqani,” the security official said.

Last week, Ijaz published several text exchanges in which his unnamed interlocutor appeared to refer directly to the memo, its approval by Zardari and transmission to Mullen, and the need to keep it secret.

In a telephone interview Wednesday, Ijaz indirectly identified Haqqani and said that he was angry because, he charged, “Husain . . . orchestrated” denials of the memo’s existence by Zardari and Pakistan’s foreign office once Ijaz published his report in the Financial Times. “That was a lie,” Ijaz said.

Special Correspondent Shaiq Hussain in Islamabad, Pakistan, contributed to this article.