Pakistan’s former ambassador to the United States was barred Thursday from traveling abroad while a panel authorized by the Supreme Court investigates a controversial memo that led to his resignation.

The court’s order came on its first day examining a petition filed by former prime minister Nawaz Sharif, now an opposition leader, who has alleged that the memo, which sought U.S. help with reining in the powerful Pakistani military, was probably crafted with the knowledge of President Asif Ali Zardari and amounted to treason.

Husain Haqqani, the former envoy to Washington, last week stepped down amid accusations that he engineered the memo, a charge he denies.

The scandal exposed the depth of civil-military mistrust in Pakistan, where the military retains firm control of foreign and security policy three years after officially ceding power to Zardari’s civilian government.

The memo, which was given to Adm. Mike Mullen, then chairman of the Joint Chiefs of Staff, after the U.S. raid that killed Osama bin Laden in May, sought assistance fending off an army coup in exchange for U.S.-friendly policies. It was not signed, and Mullen has said he did not take it seriously and ignored it.

Even so, the memo’s existence has roiled Pakistani politics. The Supreme Court case could imperil the government if it reveals that Zardari or other high-level government officials knew about or conceived the memo. A parliamentary probe into the matter is also underway.

On Thursday, the court ordered an investigative commission set up and ruled that Haqqani, who arrived in Pakistan last week to meet with civilian leaders and military officials, must remain in the country during the body’s three-week probe.

The court also called for several people related to the case — including Gen. Ashfaq Parvez Kayani, the army chief — to submit written testimony within 15 days.

In a statement, Haqqani said he had no intention of leaving the country. “I resigned to pave the way for a transparent investigation and intend to stay in my country for as long as necessary,” he said.

Asma Jahangir, the country’s most prominent human rights lawyer, said Thursday that she would represent Haqqani in court.

The controversy, known here as “Memogate,” is a “swirl of media allegations initiated by a reckless individual,” Haqqani said.

He was referring to Mansoor Ijaz, a Pakistani-American businessman who first brought the memo to light in an October column he wrote for the Financial Times. Ijaz later said he crafted and passed along the memo on the instructions of Haqqani.