Three half-brothers convicted of murder in the 1980s were cleared on Tuesday after investigators found that their cases relied on tampered evidence produced by a discredited homicide detective, Brooklyn prosecutors said.

Robert Hill, Alvena Jennette, and Darryl Austin were exonerated after evidence showed that retired Brooklyn detective Louis Scarcella used the same drug-abusing witness in six different cases.

Mr. Hill was the first one to be cleared. He walked into the courtroom with a cane while holding his lawyer’s arm. The dreadlock-wearing, grey-bearded 53-year-old has multiple sclerosis and was weeks away from parole.

“The conviction of Mr. Hill was based primarily, if not entirely, on the testimony of the witness we now find problematic, ” said Assistant DA Ron Arkell. “The use of her as a witness deprived him of a fair trial. His conviction cannot stand.”

Almost a dozen relatives and friends of the brothers clapped and cheered as they heard the statement.

According to the Brooklyn DA’s office, Teresa Gomez, a crack addict, was used as a key witness against all of them. Arkell described her as an “erratic” and “troubled” person who provided wrong details and contradicted other witnesses.

Hill, who was convicted for a fatal shooting in 1987, was the only one released from prison. Jennette, 50, was paroled in 2007. Austin died behind bars 14 years ago at age 37. Both were convicted for a 1985 murder case and were sentenced to 18 years in prison.

“I’m feeling alright,” said a smiling Hill at the press conference held outside Brooklyn Supreme Court.

“The first thing he wants to do is to have a nice and warm bath bubble bath,” said the siblings’ lawyer, Pierre Sussman. “And a home-cooked meal.”

The exoneration of the defendants was the seventh to occur under Brooklyn DA Kenneth Thompson, who has launched a large investigation into cases of wrongfully convicted people, all jailed during the tenure of his predecessor, Charles J. Hynes.

According to the DA’s office, 57 more cases involving Scarcella were under review. Scarcella, who is retired, has denied any wrongdoing.