DETROIT -- When federal agents went through the apartment door before sunrise on Sept. 17, 2001, Glock automatics at the ready, what they found caused government officials all the way to the top of the Justice Department to snap to attention.
Less than a week after Islamic extremists attacked the World Trade Center and the Pentagon, here were three North African Muslim men caught in an unfurnished apartment with airport security passes, forged passports, videotapes of American landmarks, and a crude sketch labeled ''American base in Turkey" in Arabic.
They also had virulent jihadist tapes, including a rant against Christians and Jews that said: ''Allah, kill them all. Don't keep any of them alive."
US Attorney General John Ashcroft proclaimed the breakup of a dangerous terrorist cell. Less than two years later, Detroit yielded the first trials and convictions of alleged terrorists in the United States after the attacks of Sept. 11, 2001.
But the seemingly brilliant prosecution soon imploded. Today, the terrorism convictions have been dismissed because the government withheld evidence that could have helped the defense. The US Justice Department is investigating its chief prosecutor in the case, Richard G. Convertino. He is suing the department.
The waters are so muddied that it might never be known whether the defendants actually were involved in terrorism.
The Detroit case also laid bare a problem in the government's basic strategy. To forestall attacks, officials have adopted the domestic equivalent of President Bush's doctrine of preemptive action. But prosecuting suspects before they strike forces investigators into the murky world of intent.
Evidence can be ambiguous, solid testimony scarce. It is up to prosecutors to distinguish between terrorists and hapless immigrants with phony papers.
''There's an expression that you sometimes fall in love with your case," said Keith Corbett, Convertino's trial partner. ''There was just so much emphasis in trying to address the war on terror."
The problems grow when officials are fighting with one another. And the Detroit case was rife with animosity. To Convertino, politically motivated officials in Washington, D.C., had a vendetta against him. To the Justice Department, Convertino was an overzealous prosecutor who ignored defendants' rights.
US District Judge Gerald E. Rosen, who handled the case, warned that the war against terrorism is never an excuse for trampling on the Constitution.
''Unfortunately," he added, ''that is precisely what has occurred in the course of this case."
When federal agents went to the two-story duplex south of downtown Detroit, they were seeking Nabil al-Marabh, No. 27 on a terrorist watch-list. Instead they found three immigrants from North Africa.
Karim Koubriti answered the door and said Marabh had moved out. Koubriti, Ahmed Hannan, and Farouk Ali-Haimoud were arrested, and others followed.
Youssef Hmimssa, whose photo had been found in the apartment, was picked up in Cedar Rapids, Iowa. Another associate, Abdel-Ilah Elmardoudi, was grabbed off a bus in North Carolina carrying fraudulent documents and $90,000 in cash.
The suspects, in their 20s and 30s, were charged with providing material support or resources to terrorists -- all but Hmimssa, who became the prosecutors' star witness.
Convertino came to believe that the defendants were scouts for terrorists. He said evidence suggested that Ali-Haimoud had planned to send money and weapons to ''the brothers in Algeria" and that Hannan had memorized the layout of the US Embassy in Amman, Jordan. There were indications that Elmardoudi had gone to Turkey using aliases.
With the case in the national spotlight, Washington's terrorism task force, led by Barry Sabin, was soon immersed in the activities of Convertino's team. According to the prosecutor, demands from Washington came almost daily.
With the trials just weeks away, Sabin decided the indictment needed reworking. He ordered prosecutors to clear their calendars for a meeting. When he arrived, the atmosphere grew testy. After Sabin asked where prosecutors had gotten the legal reasoning in one part of the indictment, Convertino lost it.
A high-ranking Justice Department official said Convertino ''ignored things he was told to do by us."
''He really, really, really wanted to have a piece of 9/11," the official said. ''He wanted to be the hero."
The trial began March 27, 2003.
On June 3, 2003, Elmardoudi and Koubriti were convicted of terrorism-related charges, as well as identification fraud. Hannan was acquitted of charges linked to terrorism but convicted of ID fraud. Ali-Haimoud was acquitted on all counts.
Publicly, Convertino's bosses in Detroit and Washington hailed the verdicts, but a month later Convertino and Corbett were summoned to separate meetings with the US attorney in Detroit, Jeffrey Collins.
Corbett expected a pat on the back but emerged red-faced. With Convertino, Collins started out praising the closing argument, then got to the point. As Convertino described it, Collins said, ''I've been ordered to reprimand you" for not cooperating with Washington.
In late summer, Convertino got a call from an aide to Senator Charles E. Grassley, Republican of Iowa and chairman of the Senate Finance Committee, asking Convertino to testify about identity fraud.
Alarms went off at the Justice Department. Grassley was a fierce critic of the department and an ardent protector of whistle-blowers. The day after telling his boss about the Grassley invitation, Convertino said, he was taken off the terrorism case.
When Grassley found out, he contacted Ashcroft, decrying the alleged retaliation. Then Grassley subpoenaed Convertino to appear before his committee.
Convertino said he did not criticize Washington when he testified, but he already was seen as ''off the reservation."
Within days, Collins had assigned three lawyers to review Convertino's cases dating to the mid-1990s. The terrorism case was reassigned to Assistant US Attorney Eric Straus.
Convertino got a copy of the inmate's letter more than a year before trial. But he and Corbett chose to view the prisoner as trolling for a deal. He was not credible, they decided, and they did not give his letter to the defense.
When Straus saw the letter after the trial, he told his bosses and lawyers for the defendants. They sought a new trial. Outraged, the judge ordered a hearing to sort out the matter.
The inmate refused to talk. Hmimssa acknowledged talking to the prisoner -- ''We played chess, we exchanged books" -- but denied telling his cellmate he had lied to the FBI or other authorities.
Alan Gershel, head of the criminal division in Detroit, told the judge he had ordered the letter handed over before the trial ended. But Corbett and Convertino said they never got such an order.
In February, Ashcroft appointed a Cleveland prosecutor, Craig Morford, to investigate whether other potentially exculpatory evidence had been withheld. Morford reported a pattern of prosecutorial misconduct.
Convertino disputes many of Morford's findings.
''This is retaliation; it's an absolute shame what they're doing," Convertino said. ''It's more important to destroy me and destroy the case than it is to fight the war on terrorism."
Last month, three days after getting Morford's report, the judge dismissed the terrorism-related convictions and ordered new trials on the ID fraud convictions. Defense lawyers hope the remaining charges will be dropped.