A US court has thrown out the case
against a lawyer accused of being linked to the Madrid train bombings.
The FBI apologised for the error that led to Mr Mayfield's arrest
Brandon Mayfield, 37, from Portland in Oregon, was detained after fingerprints found on a bag of detonators in Madrid were said to be his.
But last week, Spanish authorities
said the fingerprints of an Algerian man were on the bag and Muslim convert Mr Mayfield was released from custody.
The FBI has apologised for the error that led to his arrest.
But despite his release last week, the US authorities had said Mr Mayfield remained a "material witness" and put restrictions on his movements that were not lifted until the case was thrown out.
The Madrid attacks on 11 March killed 191 and injured hundreds
The Madrid attacks on 11 March killed 191 and injured hundreds of people.
A statement posted on the US District Court's website
said: "Due to the misidentification by the FBI of a
fingerprint, the court orders the material witness
"The court orders all property seized to be returned to the material witness."
In a statement issued from Washington, the FBI said: "The FBI apologises to Mr Mayfield and his family for
the hardships that this matter has caused."
Robert Jordan, the FBI agent in charge of Oregon, said the bureau would review its practices on fingerprint analyses in the light of the case.
He said the FBI's initial determination about
Mayfield's fingerprint was "based on an image of
Mr Mayfield, a former army lieutenant, said: "I am a Muslim, an American, and an ex-officer of the US military. I believe I was singled out and discriminated against, I
feel, as a Muslim."