Six officers charged in the arrest and death of Freddie Gray will have separate trials, a judge decided Wednesday, one of three rulings issued during the first Circuit Court hearing in the closely watched case.

Judge Barry G. Williams also denied defense motions to dismiss charges against the officers or force Baltimore State’s Attorney Marilyn J. Mosby and her staff to recuse themselves from the case.

While such motions hearings are usually low-key affairs, the proceedings Wednesday drew national news media and demonstrators back to a city recovering from riots that ignited the day of Gray’s funeral in April.

Six trials could mean a protracted spectacle for the city, unless Williams decides the case should be moved to a different jurisdiction. Williams is scheduled to hear arguments for a requested change of venue next Thursday.

Demonstrations on Wednesday were lively and sometimes tense, but mostly peaceful. One man was arrested and charged with assault of a police officer, disorderly conduct and making a false statement, authorities said.

The hearing came more than four months after Gray died of a severe spinal injury he suffered while in a police transport van. Gray’s case inflamed the national debate over the death of black men in police custody. It also sparked riots that prompted Gov. Larry Hogan (R) to call in the National Guard and Mayor Stephanie Rawlings-Blake (D) to implement a citywide curfew.

The scene Wednesday echoed demonstrations in April and May but on a smaller scale.

“All night, all day we will fight for Freddie Gray!” a crowd of about 40 people chanted as the hearing got underway in the Clarence M. Mitchell Jr. Courthouse.

As demonstrators headed from the courthouse toward the Inner Harbor, trailed by two police vans and a helicopter, one young man screamed, “I’m hurt! I got hit by a car!” At some point, police arrested the man. He was placed in an ambulance — as the crowd shouted, “Take off the cuffs!” — and driven away. Some in the group marched to the nearby police headquarters to demand information about him,

Inside the courthouse, the hearing was packed. About 40 members of the public, dozens of reporters, 14 defense lawyers and seven prosecutors filled the dark wooden benches of the chamber. The officers, who had filed waivers that allowed them to be absent, were not in court.

Protesters gathered outside the Baltimore courthouse where the first hearing in the case of six city police officers charged in the arrest and death of Freddie Gray is to get underway. (McKenna Ewen/The Washington Post)

Prosecutors filed charges in May against Officers Caesar R. Goodson Jr., William G. Porter, Edward M. Nero and Garrett E. Miller, Sgt. Alicia D. White and Lt. Brian W. Rice.

Goodson, who drove the van that transported Gray, faces the most serious charges, including second-degree depraved-heart murder, involuntary manslaughter and other counts. Porter, Rice and White have been charged with involuntary manslaughter and other related charges. All six are charged with misconduct in office, second-degree assault and reckless endangerment.

Defense attorneys argued in court that the case against their clients should be dismissed, alleging that Mosby’s news conference in May announcing charges against the officers overstepped rules of professional conduct for lawyers in Maryland. Defense attorney Andrew Graham said the top prosecutor’s declaration that she had heard demonstrators’ cries of “no justice, no peace” essentially meant “no convictions, no peace.”

Graham also argued that it was inappropriate for Mosby to answer questions about evidence in the case during the news conference. She had discussed whether officers gave statements to investigators in April and commented on the knife Gray carried that had been used to justify his arrest, Graham said.

Graham said the nationally televised comments tainted the potential jury pool and “make a fair trial either difficult or impossible.”

But prosecutors countered that the defense was taking Mosby’s speech out of context and that she had stated that the officers were innocent until proven guilty.

“What she said was: ‘Your peace is sincerely needed,’ ” Chief Deputy State’s Attorney Michael Schatzow said. “It was not an expression of guilt.”

Williams said it was “troubling” and “inappropriate” for Mosby to discuss evidence in the case outside of court — specifically making comments about whether the police officers were cooperating with investigators. But the judge said that it was the job of the state Attorney Grievance Commission to determine whether Mosby violated any standards of professional conduct and that none of the allegations were grounds for dismissing the ­charges. He also said that the defense would be able to question potential jurors to ensure that none were biased by the media coverage.

The defense also argued that prosecutors from the state’s attorney’s office should be removed from the case because of various potential conflicts of interest. The defense said it had several concerns, including that Mosby is married to City Council member Nick Mosby, whose district includes the neighborhood where Gray was arrested, and that she has received political and professional support from Gray family attorney William H. “Billy” Murphy Jr.

But Williams said the allegations weren’t enough to require the disqualification of Mosby and her staff.

In calling her marriage to Nick Mosby a conflict, asked the judge, was the defense implying that Marilyn Mosby couldn’t think for herself?

“Frankly, I do find that assertion troubling and condescending,” Williams said.

In the afternoon, prosecutors argued that White, Goodson and Nero should be tried together. Deputy State’s Attorney Janice Bledsoe said combining cases would make economic sense given the security resources­ required for such high-profile trials. She also said similar evidence would be used in each case as the state worked to establish how Gray suffered his fatal injuries.

But attorneys for the three officers opposed joining the ­cases. Evidence against defendants facing harsher charges­ could unfairly spill over to others, they argued.

Williams agreed.

It “is not in the interest of justice” to try some facing murder or manslaughter charges with others facing lesser counts, he said.

While it was still early in the case, Williams did set the tone for how he hoped future hearings and the eventual trials would proceed. He expressed frustration with the jabs lawyers have been throwing at one another in colorfully worded court filings and read aloud sections of the state’s standards of professional conduct for lawyers to issue a warning.

Instead of resorting to “unnecessary name-calling and over-the-top rhetoric,” Williams said, everyone should just stick to the law.

Dana Hedgpeth and Peter Hermann contributed to this report.