Updated

The District of Columbia mistakenly put Joseph Heard (search) behind bars for almost two years, but now it has made him a wealthy man.

U.S. District Judge Colleen Kollar-Kotelly (search) approved a settlement Thursday granting Heard $1.1 million -- plus legal fees -- from the D.C. government.

"It's terrific we've been able to settle this case," said John Moustakas, Heard's attorney.

Heard -- who is described as deaf, mute and mentally impaired -- was jailed in 1999 on a trespassing charge from a year earlier, even though a D.C. Superior Court judge had previously freed him, declaring him mentally unfit to stand trial.

Prison officials then lost track of his records and he was not released until 670 days later.

"It is pure Kafka to illegally throw a man in jail on charges of nothing and then make it impossible for him to protest the illegality," said Moustakas.

Heard's total settlement could reach $1.55 million once a still-undisclosed sum from the medical care contractor that treated him in jail is included, Moustakas said. The case against the medical contractor, the Center for Correctional Health Policy Studies (search), alleges that the firm administered psychotropic drugs to Heard without his consent.