In his opinion, Judge Stein wrote that the critical question “has always been whether Paracha acted with knowledge that he was helping Al Qaeda.”

Mr. Paracha had given varying, and at times incriminating, statements to the authorities about his knowledge of the men’s Qaeda ties, the judge noted. At his trial, Mr. Paracha testified that key portions of his statements were false and stemmed from “a combination of fear, intimidation and exhaustion,” the judge said.

But in years since Mr. Paracha’s conviction, the judge said, new evidence had come to light: statements not only by Mr. Khan and Mr. al-Baluchi, but by the self-described architect of the Sept. 11, 2001, attacks — Khalid Shaikh Mohammed.

All three men were detainees at the Guantánamo Bay, Cuba, military prison, and still are. Their statements, made before military tribunals or in interviews with federal agents, “directly contradict the government’s case” that Mr. Paracha knowingly aided Al Qaeda, the judge wrote.

Mr. Khan, for example, told the authorities that he had never disclosed his Qaeda ties to Mr. Paracha, whom he described as innocent; and Mr. Mohammed “openly confessed his responsibility for dozens of heinous crimes and terrorist plots” but never mentioned Mr. Paracha or his father (who had also been sent to Guantánamo), the judge said.

Given this new evidence, Judge Stein wrote, Mr. Paracha could “credibly ask the jury” to infer his innocence and “lack of involvement in the operations discussed.” Allowing his conviction to stand would be a “manifest injustice,” the judge said.

In the new court filing, the government, in explaining the decision to drop charges, made it clear that beyond the burden of the classified-document review, it also had considered Mr. Paracha’s long stay in prison and his agreement to renounce his residency status and leave the country.