The case gripped residents throughout the Washington region. An 83-year-old woman, known as “Grandma” in the Foggy Bottom neighborhood where she sold hats, umbrellas and T-shirts from a vending table outside the Metro station, was viciously beaten and robbed. The attack was caught on security cameras, and the video was played over and over again on television and local news Web sites.

Just days after the May 3, 2005, attack, a District man, James Dorsey, was arrested. A jury found him guilty, and he was sentenced to 14 years in prison.

But now, prosecutors must decide whether to drop their case against Dorsey or bring it to trial again.

Last week, the D.C. Court of Appeals ruled 5-2 that detectives violated Dorsey’s rights when they arrested him, handcuffed him to a chair for 13 hours and repeatedly questioned him after Dorsey said that he didn’t want to talk and requested an attorney.

The court overturned Dorsey’s conviction and ordered a new trial.

At issue is a videotaped confession in which Dorsey never waived his right to silence nor his right to speak to an attorney, the judges ruled.

Despite objections from Dorsey’s attorneys, two D.C. Superior Court judges — during Dorsey’s initial hearing and subsequent trial — allowed prosecutors to play the videotaped statement. It was a crucial piece of evidence because neither the victim, Vasiliki Fotopoulos, nor witnesses could identify the attacker.

A spokesman for the U.S. attorney said the office was reviewing the court’s ruling and declined to comment.

District Police Chief Cathy L. Lanier said in an e-mail that the department “obviously does not condone the types of techniques that were used in the initial interrogation of defendant Dorsey, and it would be a violation of MPD policy to continue an interrogation once a suspect has invoked his/her right to counsel. MPD would consider corrective action against those investigators, if they were still members of the department.”

D.C. defense attorneys hailed the ruling, calling it a strong message to prosecutors and detectives.

“The police in this case made every mistake possible,” said James W. Rudasill Jr., a District defense lawyer. “The police can’t ignore a request for an attorney, and they can’t question or take statements from a suspect without reading their rights first.”

The case was highly publicized after police released security footage to local TV news stations and Web sites showing the attack, which occurred behind an apartment building in the 700 block of 24th Street NW. The video showed a hooded man punching and attacking Fotopoulos. The man’s face was obscured.

The attack left Fotopoulos with a broken cheekbone and nose and cracks in her knee, which caused her to rely on a walker. Police officers called it one of the worst beatings ever caught on tape. Fotopoulos’s attacker made off with about $300.

Dorsey, now 54, has a record that dates to 1979, with at least 30 arrests and 10 convictions for assault with a dangerous weapon, burglary, grand larceny and other crimes.

At Dorsey’s sentencing, a year after the attack, his attorney said that his client had suffered from drug problems and depression.

In briefs filed with the court, prosecutors defended the use of the confession. “His decision to talk itself reveals that his waiver was knowing and intelligent,” the prosecutors wrote.

Dorsey was arrested four days after the attack on initial charges of domestic abuse involving his girlfriend. Dorsey waived his rights to counsel and began talking to detectives when they asked him questions about the incident with his girlfriend. But when detectives began asking about the attack on Fotopoulos, Dorsey said that he did not know what they were talking about and said he was not in Foggy Bottom on the day of the attack.

Dorsey then said he no longer wanted to talk about the attack on the vendor and that he wanted to be escorted back to his holding cell. Dorsey then told the detectives he wanted an attorney. At one point, one of the detectives said, “You don’t want that,” according to the judges’ filing.

Dorsey was questioned by four detectives for about three hours. As Dorsey sat handcuffed to the chair for another 10 hours, he urinated on himself.

A day after the questioning, Dorsey agreed to make a confession. But the judges, who were concerned that Dorsey was subject to a “grueling overnight” and that his confession was a result of “improper, post invocation badgering,” said that Dorsey should have been read his rights again and should have been given the chance to waive those rights before he made the confession.

Avis Buchanan, director of the District’s Public Defender Service, which represents Dorsey, said that her office was pleased that the court “vindicated Mr. Dorsey’s constitutional rights to counsel and to remain silent during interrogation.”

Calls to Fotopoulos’s family were not returned. Vendors near where Fotopoulos worked said that they were angry that their friend’s attacker could be freed. One vendor, Harold Morning, blamed police.

“There should have been enough evidence in this case where they didn’t have to mistreat a suspect and jeopardize their entire case,” Morning said.

Staff researcher Magda Jean Louis contributed to this report.