In Portland, meanwhile, investigators were quickly building their case against Mr. Mayfield, 37, a Muslim convert, and arrested him on May 6 on a material witness warrant, a technique that civil liberties advocates contend that the Bush administration has abused in an effort to fight terrorism. Despite never being charged with an actual crime, court transcripts and interviews with Mr. Mayfield and his lawyer, Steven T. Wax, the federal public defender in Oregon, show he was told that he was being investigated in connection with crimes punishable by death. He was jailed for 14 days. On May 24, after the Spaniards had linked that same print from the plastic bag to the Algerian national, Mr. Mayfield's case was thrown out. The F.B.I. issued him a highly unusual official apology, and his ordeal became a stunning embarrassment to the United States government.

The Conflict

In interviews this week, Mr. Corrales, Mr. Melida and other Spanish law enforcement officials suggested that the entire episode could have been avoided. Mr. Melida was among 10 Spanish police officials who met on April 21 in Madrid with a fingerprint examiner from the F.B.I. laboratory at Quantico, Va., -- one of three F.B.I. examiners who confirmed the Mayfield match -- and other American officials to discuss their differing views on the fingerprint.

Mr. Baker said the F.B.I. may have erred by sending examiners to Spain to try to iron out wrinkles in the case in April and May, rather than sending higher-level officials to signal that the case was a high priority for the United States. The F.B.I. official who spoke on condition of anonymity said the examiner who met with the Spaniards was one of the F.B.I.'s best forensics people, but he acknowledged that the examiner did not speak Spanish. Other Americans at the meeting did, however.

At the meeting, the F.B.I. presented the Spaniards with a three-page document detailing their findings, Mr. Melida said.

F.B.I. officials told Congress members in the briefings last week that they had come up with the match after working off a ''second-generation'' digital print -- meaning a copy of a copy. But they gave a somewhat different explanation in interviews this week, saying they were now uncertain what generation the digital print represented. But the F.B.I. official who spoke to The New York Times on condition of anonymity added that the real issue was the quality of the latent print that the Spaniards originally took from the blue bag.

The determination by an F.B.I. examiner that the print was useable was hasty and erroneous, F.B.I. officials said, and set the agency off in the wrong direction and corrupted the rest of the process. (In an article on May 8 in The Times, one Spanish official erroneously said that authorities there thought the prints matched.)

At the April 21 meeting, the F.B.I. presented the Spaniards with a three-page document detailing their position that the prints from the bag belonged to Mr. Mayfield, said Mr. Melida, the head of the fingerprint unit for the Spanish National Police, whose team analyzed the prints in question. The Spanish law enforcement officials kept pointing out discrepancies between their analysis and that of the F.B.I., but this did not seem to sink in with the Americans, Mr. Melida said.