A grand jury in Baltimore has indicted six police officers on homicide and assault charges in the death of Freddie Gray, who was fatally injured last month in police custody, the city’s chief prosecutor said Thursday.

The charges announced by Marilyn J. Mosby, the state’s attorney for Baltimore City, do not differ greatly from those she initially filed against the officers. But getting a grand jury to agree and deliver an indictment is a milestone in a case that has generated national attention.

The case of Mr. Gray, 25 — who was arrested and injured on April 12 and died a week later — was one in a string of recent encounters around the country in which young black men have died at the hands of the police, prompting protests, arguments about the role of race in law enforcement and claims that police practices are deeply flawed.