Nineteen years was too long to wait to prosecute a murder charge, a judge has ruled in throwing out a 2007 indictment for a 1988 Bronx shooting.

Supreme Court Justice Troy K. Webber (See Profile), sitting in the Bronx, dismissed an indictment charging Raed Ayyash with second-degree murder, finding that the prosecution’s 19-year delay in bringing it denied Mr. Ayyash his due process rights to prompt prosecution.

Justice Webber said she was “loathe to dismiss” such a serious charge, but found prosecutors had failed to prove the reasonableness of the delay.

“There is nothing to suggest that the delay was precipitated by anything other than inattention,” she wrote in People v. Ayyash, 2777-2007.

In dismissing the charge, which carried a 25-year-to-life sentence upon conviction, Justice Webber singled out Risa Sugarman, then-chief of the Bronx district attorney’s Homicide Bureau, for her handling of the case.

“Rather than a concern that the witnesses would not cooperate or a desire to conduct further investigation, it appears that the case was not prosecuted in 1988 solely based upon Assistant District Attorney Sugarman’s having felt ‘slighted’ that she was not consulted prior to the defendant’s arrest,” Justice Webber wrote.

The Jan. 24 decision followed an August 2011 hearing, where Detective Kevin Tracy of the Bronx homicide task force testified. Detective Tracy took over the unsolved case in 2005.

In September 1988, two men entered the apartment of Hassan Abusalem and his wife, Brunilda Toro-Abusalem. Mr. Abusalem was fatally shot. His wife was also shot but survived a graze wound to the head.

Mr. Ayyash’s attorney, Matthew J. Kluger, a Bronx solo practitioner, said Mr. Abusalem and Muhammad “Mike” Abuhweig—who Ms. Toro-Abusalem later identified as one of the perpetrators—were both drug dealers and the shooting was due to a drug-related debt.

Ms. Toro-Abusalem and her neighbor, Iaisheh Mustafa, spoke with detectives after the attack. Ms. Toro-Abusalem was interviewed by police several times, offering detailed descriptions of the two men. She identified Mr. Abuhweig as one of the men.

Days after the shooting, Ms. Mustafa identified Mr. Ayyash in both a photo array and a line-up.

But Ms. Sugarman voided Mr. Ayyash’s arrest. In her decision, Justice Webber said at the time Ms. Sugarman was “apparently displeased that the arresting detectives did not consult with her prior to making the arrest.”

Ms. Sugarman also was apparently concerned the eyewitnesses “were scared or terrified and could not be counted on to cooperate in the future,” the decision said.

After Ms. Sugarman voided the arrest, Ms. Toro-Abusalem identified Mr. Ayyash in a photo array. Nevertheless, cases against Mr. Ayyash and Mr. Abuhweig were not pursued at the time.

Mr. Ayyash, now 50, has maintained his innocence, saying he was not present at the shooting, Mr. Kluger said.

Mr. Kluger said his client passed a lie detector test and looked “remarkably similar” to another man who had admitted to a potential witness and others that he had accompanied Mr. Abuhweig. This information had been turned over to the Bronx district attorney’s office, Mr. Kluger said.

The defense attorney said his interpretation of the facts behind Ms. Sugarman’s displeasure with the arrest was that she may have thought the facts were not strong against Mr. Ayyash.

“A good prosecutor would have serious concerns about the case,” against Mr. Ayyash, Mr. Kluger said.

In 1997, attempts to track down Mr. Abuhweig and the witnesses were unsuccessful.

When Detective Tracy took the case in 2005, he tried again to locate the witnesses and Messrs. Ayyash and Abuhweig. He found both men in San Diego, but Mr. Abuhweig, living under a different name, then moved back to Jordan.

After it became clear Mr. Abuhweig would not come back from Jordan, Mr. Ayyash was arrested in San Diego, where he had started a pizza restaurant.

Mr. Ayyash was indicted in July 2007 and released on $100,000 bail one year later. Mr. Ayyash’s friend put his house up as collateral for the bail bond, Mr. Kluger said.

In her decision, Justice Webber observed that she had to weigh five factors when deciding if a defendant’s due process rights to prompt prosecution were violated.

The factors were the extent and reason for the delay, the nature of the charge at question, if there had been extended pretrial incarceration and whether the defendant was harmed by the delay.

“The record does not indicate any good cause excusing the 19-year delay. The record does not indicate any basis for the delay in the prosecution other than the refusal by the chief of the Bronx district attorney’s Homicide Bureau to authorize the arrest in 1988,” Justice Webber wrote.

She observed that Detective Tracy had testified at the hearing that Ms. Sugarman thought the witnesses might not cooperate out of fear for personal safety.

But the judge said the record was “devoid of any clear indication of fear on the part of the witnesses” with Detective Tracy’s testimony based on “vague notation in the case file.”

Prosecutors also argued the case needed extensive investigation. But Justice Webber said that assertion was “belied by the fact that the exact same information which was available and known to law enforcement in 2005 and 2007, was also known to them in 1988.”

Detective Tracy had reviewed the 1988 case with no additional witnesses or new forensic evidence, she said.

Ms. Sugarman, now a deputy commissioner of the state Division of Criminal Justice Services and director of the Office of Sex Offender Management, referred comment to the division’s press office, which declined to comment.

Mr. Kluger praised Justice Webber’s decision, saying, “It’s a difficult thing to dismiss a murder case but given the state of the law, I don’t believe the court had any choice.”

Assistant District Attorney Christine Scaccia represented the Bronx district attorney’s office. An office spokesman declined to comment on the decision.