A former Army scientist who was named as a person of interest in the 2001 anthrax attacks will receive $5.8 million to settle his lawsuit against the Justice Department.

Steven Hatfill claimed the Justice Department violated his privacy rights by speaking with reporters about the case.

Settlement documents were filed in federal court Friday. Both sides have agreed to the deal, according to the documents, and as soon as they are signed, the case will be dismissed.

The deal requires the Justice Department to pay $2.825 million up front and buy Hatfill a $3 million annuity that will pay him $150,000 each year for 20 years.

"Our government failed us, not only by failing to catch the anthrax mailers but by seeking to conceal that failure," Hatfill's lawyers said in a statement. "Our government did this by leaking gossip, speculation, and misinformation to a handful of credulous reporters."

The statement also blamed journalists for not questioning the motives of the government's statements or its tactics.

"As an innocent man, and as our fellow citizen, Steven Hatfill deserved far better," they said.

The Justice Department said the settlement was in the best interest of the nation.

"The United States does not admit to any violation of the Privacy Act and continues to deny all liability in connection with Dr. Hatfill's claims," Justice Department spokesman Brian Roehrkasse said in response to the settlement.

Five people were killed and 17 sickened by anthrax that was mailed to lawmakers on Capitol Hill and members of the news media in New York and Florida just weeks after the Sept. 11, 2001, terrorist attacks.

After the attacks, Attorney General John Ashcroft called Hatfill "a person of interest" in the investigation and stories by various reporters followed. Hatfill had worked at the Army's infectious diseases laboratory from 1997 to 1999. The anthrax attacks remain unsolved.

The settlement likely also means that former USA Today reporter Toni Locy will no longer face up to $5,000-a-day in fines in the case. A federal judge ordered her to identify the officials who discussed Hatfill. When she said she couldn't remember, the judge ordered her to identify all her sources on the anthrax case.

She challenged that order, but a federal appeals court has yet to rule in the case. Because Hatfill's lawsuit is being settled, Locy's case will probably be dismissed as moot, though that will be up to the appeals court. Hatfill's lawyers told the court Friday that they no longer need her testimony.

"I hope this means that this ordeal is over and that I can get on with my life," Locy said. "I am pleased that Dr. Hatfill's lawyers are now saying they no longer need my testimony, but I don't know if my appeal is moot or if the contempt order against me will be lifted because I don't have anything at this point from the Court of Appeals or Judge Walton that says I'm in the clear."

Attorneys for Locy said she had no money to pay the fines imposed by U.S. District Judge Reggie Walton. Locy, a former reporter with The Associated Press and other news organizations, now teaches journalism at West Virginia University.