(CNN) -- Pakistan's prime minister asked his country's ambassador to the United States to resign amid a probe into a secret offer to Washington by Pakistan's president to cut down the powers of the country's military leadership.
Ambassador Husain Haqqani's resignation is necessary "so that the investigation can be carried out properly," a statement from Prime Minister Yousaf Raza Gillani said Tuesday.
"All concerned would be afforded sufficient and fair opportunity to present their views and the investigation shall be carried out fairly, objectively and without bias," the prime minister's statement said.
Haqqani posted a Twitter message Tuesday saying the he "requested" that Gillani accept his resignation.
The ambassador offered to resign last week "or participate in any inquiry that brings an end to the vilification against the democratic government of Pakistan currently being undertaken by some elements in the country."
The controversy started with swirling media reports that President Asif Ali Zardari asked the U.S. government in May to help him hold on to power because he feared a military coup after the U.S. raid on Osama bin Laden's compound in Abbottabad, Pakistan.
Last month Pakistani businessman Mansoor Ijaz sparked the political firestorm when he claimed in an op-ed piece for the UK-based Financial Times that a Pakistani diplomat used him to make Zardari's back-channel plea for help by delivering a secret memo to U.S. Admiral Mike Mullen, then Washington's top military official.
Ijaz claimed Zardari offered a new "national security team" to take over the powers of the military leadership in exchange for Washington's assistance.
Media reports in Pakistan have speculated that Haqqani played a key role in the alleged offer.
Haqqani has denied the allegations, saying they are part of ongoing "smear campaigns" that have accused him of trying to undermine Pakistan's armed forces.
"No memo of the kind being discussed in the media was drafted or delivered by me," Haqqani said. "I have not been named so far as having done anything wrong by anyone except through innuendo."
The political controversy threatens to shake an already tense relationship between Pakistan's military and civilian leadership and sets the stage for a potential test of strength between the president and Pakistan's Army Chief Ashfaq Kayani, who is widely believed to be the most powerful man in Pakistan.
Haqqani's resignation underscores that the military is still the strongest institution in Pakistan, Islamabad-based political analyst Imtiaz Gul told CNN.
"The military establishment remains the strongest in terms of influence," Gul said. "The military is repeatedly empowered and has the upper hand because of a weak civilian government and civilian leaders who lack integrity."
Haqqani's resignation should have no impact on Pakistan-U.S. relations, Gul said.
"The U.S.-Pakistani relationship is need based," he said. "Both countries need one another and issues like this won't have any impact on how the two countries move forward."
The memo controversy could also damage an already chilly relationship between the military and President Zardari," Gul said. "It has basically revived an old rivalry between the military and President Zardari."
The president's spokesman, Farhatullah Babar, rejected allegations that Zardari was involved in a secret back-channel attempt to oust Pakistan's military leadership.
"The president has no knowledge, has denied and was not involved in any of these allegations," Babar said.
CNN's Reza Sayah and journalist Nasir Habib contributed to this report.