Common Pleas Court Judge Rose Marie DeFino-Nastasi called the evidence against them extremely weak.
A month later, the judge freed both on bail pending a decision on a new trial.
On Wednesday morning, Assistant District Attorney Brian Zarallo made it official, going before DeFino-Nastasi and withdrawing all charges.
"We can't proceed against either of these two men - or anyone else," Zarallo, who oversaw the Keal murder reinvestigation, said in an interview.
Zarallo said the passage of time made the new probe difficult. Some witnesses were uncooperative and others made inconsistent statements.
He said withdrawal of charges against Gilyard and Felder was done without prejudice, a legal term that means charges could be refiled if new evidence is found.
Like all unsolved homicides, the Keal case remains an open investigation, Zarallo added.
"We're are ecstatic," said Marissa B. Bluestine, legal director of the Pennsylvania Innocence Project, based at Temple University. The Gilyard-Felder case was the first developed by the five-year-old organization that resulted in overturning convictions and freeing individuals from prison.
Bluestine said both men did not want to be immediately interviewed.
Since being freed, they have been working to adjust to a high-tech society that did not exist when they were arrested in 1998.
Gilyard has since married, and the couple are expecting their first child.
Felder had been living with his sister.
"This was a great team effort on the part of the lawyers and the families," said Center City civil rights lawyer David Rudovsky, who represented Gilyard. "It was great to work to help someone who was innocent."
Jules Epstein, a civil rights lawyer and Widener University law professor who represented Felder, praised what he called "a truly honorable decision by the District Attorney's Office."
"He's a good man," Epstein said of Felder. "Right now, he's part of a loving family, and our next step is to help him get a job."
Keal, a North Philadelphia businessman with a bar and seafood store, was walking home at 2 a.m. on Aug. 31, 1995, when he was accosted by two armed men at 17th Street and Erie Avenue.
When Keal resisted demands for money and went for his own weapon, one robber shot him in a leg with a sawed-off shotgun. After Keal was on the ground, witnesses said, the other gunman shot him in the head with a handgun.
Gilyard and Felder were not arrested until January 1998, and then on the basis of a shaky photo identification by Keal's daughter. Tonya Keal glimpsed her father's shooting for about five seconds from her apartment above his seafood store. Hers was the only evidence against the pair. There was no physical evidence.
Gilyard, however, never gave up efforts to prove his innocence, and three years ago, he persuaded Innocence Project officials to follow up on his leads.
In June 2011, Innocence Project investigators obtained a statement from Ricky "Rolex" Welborn, now 35, a West Philadelphia man serving life for an unrelated murder. Welborn, who sometimes worked as an enforcer for a drug gang operated by Felder's oldest brother, confessed that he and another man he refused to identify shot Keal. Welborn also said Gilyard and Felder had nothing to do with the crime.
Gilyard and Felder, who sold drugs for Felder's brother at the time, always insisted they were innocent.
Zarallo said there was no credible evidence to arrest Welborn or his alleged accomplice.
Zarallo cited letters written by Welborn last year to Gilyard and Felder's relatives demanding $10,000 he said they promised for confessing to the crime.
The pair's lawyers have denied any such promise, but Zarallo said the allegations had undermined the credibility of Welborn's statement.