BROOKLYN, N.Y. — The prosecutor spent 10 months investigating a mysterious blaze that killed six people at a Brooklyn drug den.

She pored over scientific evidence suggesting arson, dissected witness accounts pointing to the guilt of three men and eventually unearthed a shocking deathbed confession that proved vital to cracking the case.

When her review was done, Lisa Perlman felt confident she had assembled a solid case and was ready to take it to a judge.

These men, she told the court, were innocent.

Perlman is not your average prosecutor. As a member of the Conviction Review Unit in the Brooklyn District Attorney's Office, she doesn't put people behind bars; she sets them free.

The legal unit is tasked with identifying questionable old cases, reviewing prosecutions and overturning wrongful or unfair convictions. In the last two years, the assistant district attorney and her eight colleagues have overturned 20 convictions ranging from burglary to murder, including the 1981 arson convictions of the three men.

“The books never close on these cases,” said Mark Hale, Perlman's boss and chief of the unit.

The Brooklyn office is part of a growing national trend among prosecutors, including those in Los Angeles and Chicago, who have established teams to assess and rectify problematic convictions. Last year, there were 24 such units nationwide, double the number in 2013 and four times as many as in 2011, according to the National Registry of Exonerations at the University of Michigan Law School.

“It's a common-sense realization that in any sort of system which is so reliant on human factors, that people are going to make mistakes,” Hale said. “And maybe these mistakes can't all be remedied. But if we don't seek to remedy those mistakes, then we aren't doing our jobs.”

The Brooklyn unit was established in 2011. It was relatively small, with just two attorneys who juggled other assignments.

Three years later, newly elected District Attorney Ken Thompson beefed up the squad, in part to address a scandal involving a retired homicide detective whose repeated reliance on the same drug-addicted witness had already led to several wrongful convictions being overturned. Thompson gave the unit a $1.1-million budget and tapped Hale, a veteran homicide prosecutor, to run it full time. With nine full-time assistant district attorneys, including himself, and three investigators, Hale now oversees the largest such unit in the nation.

“Wrongful convictions not only destroy the lives of the wrongfully convicted and their families, but they also undermine the integrity of the criminal justice system,” Thompson said. “We as prosecutors should not be dragged kicking and screaming down the road about wrongful convictions.”

Not everyone embraced their efforts. The team got strange looks and tough questions from colleagues who viewed them as an internal affairs squad working to free convicts who had been tried by other prosecutors. But Hale and his unit have worked to win them over by not emphasizing their colleagues' and former prosecutors' mistakes, or assigning blame in public.

Most often the wrongful convictions stemmed from a series of overlapping errors by police and witnesses, or from prosecutors taking a case to trial that would not be brought under today's legal, evidentiary or ethical standards.

Since launching, the unit has selected 160 cases to examine and has finished reviews of about 60.

Some cases were relatively easy — tracking down a witness who admitted she lied about seeing a man leave her apartment with her television, or discovering a receipt in an evidence file that proved a defendant could not have committed a 1989 slaying.

But the unit quickly found that most of the low-hanging fruit — cases easily overturned by DNA testing — had already been culled from shelves.

What's left is a sad echo of the street violence that ravaged New York and many other cities decades ago. Such prosecutions sometimes hung on the testimony of disreputable witnesses or were overseen by beleaguered detectives and prosecutors. Finding the errors, let alone correcting them, can be time-consuming and tedious.

In the arson fire that killed a young mother and five of her children, outdated science provided the first break in reversing murder convictions of the three men — Amaury Villalobos, now 67, William Vasquez, 78, and Raymond Mora, who died in 1989 at the age of 44. All were sentenced to life in prison, though Villalobos and Vasquez were paroled in 2012. They declined to comment through their lawyers.

New York Law School professor Adele Bernhard led the effort to clear Villalobos' name, bringing the case to the Brooklyn prosecutors' attention last year. Bernhard pointed out that a fire marshal provided crucial testimony that someone had intentionally set the inferno that tore through the three-story townhouse. But using modern science, experts today concluded that the burn patterns did not necessarily indicate the presence of an accelerant, as the fire marshal had testified. It might also have been an accidental fire.

That was a start, but Perlman needed more. She examined case files, transcripts and crime-scene photographs.

One thing kept bothering her: The men were implicated almost entirely based on the eyewitness account of landlord Hannah Quick, a drug dealer who ran the building as a shooting gallery for addicts, Perlman said. And Quick's account kept changing.

“It was clear this was someone making stuff up, and she couldn't keep track of it all,” Perlman said.

Perlman was disappointed to learn that Quick had died months earlier. They next canvassed her neighborhood and were alarmed at what they heard: Quick was an alcoholic and an inveterate liar.

“One of her daughters,” Perlman said, “told us that she lied so much that she couldn't tell when her mom was telling the truth.”

To Perlman, it was compelling, but not quite enough to prove innocence. Then came a break. She tracked down another of Quick's daughters.

Upon meeting Perlman, the woman almost immediately began to sob, saying her dying mother had confessed to lying about the men setting the blaze.

As she left the interview, Perlman flashed back to the prisoners' parole transcripts. The first four times Villalobos and Vasquez appeared before the parole board, they were denied because they refused to accept responsibility for the fire. They kept claiming they were innocent.

“It was heartbreaking,” Perlman said. “I was reading this transcript, and you could hear the men straining to say they were innocent and nobody was hearing them.”

In December, Perlman and Hale went to court, and a judge erased the convictions.

del.wilber@latimes.com