By Scott Malone and Ian Simpson

(Reuters) - Baltimore prosecutor Marilyn Mosby strutted into the national spotlight last year when she filed criminal charges against six officers tied to Freddie Gray's death in police custody just days after the alleged crime.

On Wednesday, after losing the first four trials, she gave up on the case. Such a high-profile failure would be a heavy blow for the career of any prosecutor, but Mosby's quick action has earned her significant support in the majority black city of 620,000 people, legal experts and civil-rights activists said.

"She did what she had to do," said Tessa Hill-Aston, president of the Baltimore City branch of the National Association for the Advancement of Colored People. "Because she brought these charges, we have some changes in Baltimore."

Hill-Aston noted that since the charges, Baltimore police started to issue officers body cameras and install cameras inside police transport vans like the one where Gray, 25, sustained his fatal injuries while restrained by handcuffs but not a seatbelt.

"All these things would have taken years to happen. But because of her, we have had more rapid movement," Hill-Aston said.

Gray's case was one in a long series of high-profile deaths of black men at the hands of police over the past two years, which stirred a national debate on race and justice and fueled the rise of the Black Lives Matter movement.

Mosby, who is black, was a little more than four months into her role as state's attorney for Baltimore City in April 2015 when she charged the officers four days after the city exploded in a day of rioting and arson following Gray's funeral.

In an editorial published shortly after Wednesday's announcement, the Baltimore Sun newspaper praised Mosby for both her decisions, saying the move to bring the charges helped cool tempers and bring an end to the violence.

"The process of these trials has helped rather than hurt the cause of repairing the rift between the police and the community," the newspaper wrote in an unsigned editorial.


But legal experts said Mosby may have botched the case by moving too quickly. Grand juries in New York and Ferguson, Missouri, by way of comparison, reviewed evidence of similarly controversial deaths for weeks before ultimately deciding not to bring criminal charges.

"She acted too quickly," said David Weinstein, a former state and federal prosecutor now in private practice in Florida. "She didn't take the time that was necessary to conduct an investigation in a case like this."

Mosby, 36, whose husband Nick last year ran an unsuccessful campaign for mayor of Baltimore, blamed what she described as a shoddy police investigation for the failure of her cases. The head of the city's police union rejected that claim, calling it "outrageous." [L1N1AD0TP]

Gray died of his injuries on April 19, 2015, a week after his arrest. That made the case less easy to prosecute than cases in which police shoot suspects, legal experts noted.

"This case was always a hard one to prove and certainly beyond a reasonable doubt," said David Jaros, a law professor at the University of Baltimore who closely followed the trials.

"If ultimately Marilyn Mosby doesn't pay a high political price for this, it may suggest that there are cases that state's attorneys can take seriously and pursue, and we may see more in the future."

Daniel Alonso, a former chief assistant district attorney in New York, agreed that Mosby's decision to prosecute the officers was risky.

"Prosecutors come close to a dangerous line when they start promising justice to crowds," Alonso said.

Mosby, in a fiery press conference on Wednesday in the neighborhood where Gray lived, and where he was arrested, vowed to fight on.

"I was elected the prosecutor," Mosby said in her first public remarks on the case in more than a year, after a judge lifted a gag order that prevented lawyers from discussing it. "I signed up for this, and I can take it."

(Reporting and writing by Scott Malone in Boston, additional reporting by Ian Simpson in Washington, D.C. and Karen Freifeld in New York)