Lawyer Brandon Mayfield, wrongly arrested by FBI agents after the 2004 Madrid terrorist bombings, has settled his lawsuit against the U.S. government for $2 million, his attorney said Wednesday.

The lawsuit said Mayfield was wrongly arrested on the basis of a misidentified fingerprint.

The FBI and the U.S. attorney general's office did not immediately return calls from The Associated Press seeking comment.

Mayfield, a convert to Islam, said he was arrested because of his faith. He was held for two weeks in 2004.

The FBI did not immediately return messages seeking comment.

Mayfield was jailed on a material witness warrant but was released after the FBI acknowledged the fingerprint were not his.

The government acknowledged in the settlement that it "performed covert physical searches of the Mayfield home and law office, and it also conducted electronic surveillance targeting Mr. Mayfield at both his home and law office," according to a news release from Mayfield's attorney, Elden Rosenthal.

As part of the settlement, the government again apologized to the Mayfield family, Rosenthal said.