At least two people were arrested after Judge Barry Williams announced a mistrial in the case, but the protests remained peaceful as officials and advocates called for calm.
At the intersection of Pennsylvania and North avenues — the epicenter of rioting that broke out in April on the day of Gray's funeral — those who gathered to link arms and pray made it clear they did not want more unrest.
"We're showing the youth that what happened earlier this year cannot happen again," said Dominic Nell, 39, a Penn North resident, community activist and freelance photographer. "We're coming together and bridging the gap."
As the Porter trial wore on, Baltimore officials prepared for the possibility of another outbreak of the rioting, looting and arson that followed Gray's death from a spinal injury sustained in police custody. Six officers were charged in his death, and Porter was the first to go to trial.
Wednesday, after three days of deliberation, the 12 members of the jury declared they could not reach a verdict on any of the four charges Porter faced.
The announcement of the mistrial soon triggered protests.
Sheriff's deputies arrested two people outside Baltimore City Circuit Court as a small group of protesters faced off with officials.
One of those arrested was Kwame Rose, 21, a prominent Baltimore activist whose full name is Darius Kwame Rosebaugh; the other was a 16-year-old boy whom officials did not identify. Deputies took the boy to the ground as they arrested him, and then pulled him inside the courthouse, while forcing media and protesters to move back.
Maj. Sabrina Tapp-Harper, a spokeswoman for the Baltimore Sheriff's Office, said the two were being booked Wednesday night on charges of failing to obey a lawful order and disorderly conduct, and for using a bullhorn outside the courthouse, which was considered a violation of laws regarding public peace. They were the only people arrested, she said.
Video of the juvenile's arrest showed him standing next to a protester with a bullhorn when a sheriff's deputy grabbed him by the throat and pushed him backward toward a building.
Tapp-Harper declined to comment on the video but said the teen had used the bullhorn. "Just because it wasn't captured on video does not mean he wasn't using it," she said.
Later, demonstrators gathered at City Hall and marched through downtown streets, at times stalling traffic and eliciting angry honks from motorists.
Shouting chants such as, "All night, all day, we will fight for Freddie Gray," the group passed by the courthouse, down The Block on Baltimore Street and by police headquarters before returning to City Hall.
Police officers hurried to form a line on President Street, blocking the marchers from going onto Interstate 83. There was a brief face-off between some marchers and police, but the group soon turned around.
"We want justice and we're just not going to get it," said David Rogers, a Northwest Baltimore resident, who held a large sign saying "It Stops with Cops."
He added, "I'm expecting all this to just go south. This just sets the stage for all the other trials."
A line of law enforcement officers stood guard outside City Hall, as a growing group of protesters formed under a Christmas tree in front of the War Memorial Plaza.
Paul Rucker of Highlandtown laid out a few dozen musical instrument cases on the lawn in front of City Hall, a symbolic statement about "lives cut short." The instrument cases, with small American flags draped over them, resembled coffins. Rucker, an artist, had an installation at the Baltimore Museum of Art earlier this year that was intended to be a commentary on the country's race and police relations.
The downtown march and protests remained peaceful, breaking up after about an hour.
About two dozen demonstrators walked a few blocks to the Baltimore City Juvenile Justice Center to check on the teen who was arrested outside the courthouse. An employee came out and told the protesters that the boy wasn't there. The group remained for about an hour, occasionally chanting and at one point locking arms in a line across the building's front doors.
Meanwhile, officials and others called for protesters to avoid the rioting that shook the city in April.
Rep. Elijah Cummings, a Democrat from Baltimore, said he "wasn't shocked" by the verdict because it seemed a high standard to have 12 people reach the same conclusion. "I think people need to keep in mind that there are other jurisdictions where African-American men in particular have been shot down and there was no trial, none, and life just went on," he said.
The Rev. Jamal H. Bryant, pastor at the Empowerment Temple in Northwest Baltimore, said he expected "peace" as the night wore on.
"The good news is that a mistrial is not 'not guilty,'" Bryant said. "But clearly this is not going to be a jog, it's going to be a marathon, and we're going to have to push our way through it."
In West Baltimore, the crowd at Penn North began linking arms shortly after 6 p.m., moving west down North Avenue. The crowd stretched more than a block, with TV cameras every several feet. A small police presence kept watch nearby as the crowd began praying for peace.
Some protesters said the mistrial left them frustrated and disheartened.
Harlem Smith, 28, noted that the city has agreed to pay $6.4 million to Gray's family to settle civil claims; the city did not acknowledge any wrongdoing by its officers.
"The city gave the family all that money," he said as he stood near the intersection of Pennsylvania and North avenues. "They practically said [Porter] was guilty. How can the jury not find him guilty?"
Johnnie Phillips, 60, said, "I thought he would be found guilty. I know a lot of other people felt that way. I can't see people letting this happen. I wasn't involved in the first protest but I might be involved in the next."
Lt. Col. Melvin Russell, the chief of the police department's Community Collaboration Division, engaged residents along Pennsylvania Avenue, even picking up a young child at one point. He later said the peaceful demonstrations show what happens when Baltimore comes together. The unrest earlier this year came from emotion, he said.
"This is who Baltimore really is," Russell said.
Brucie Gardener, 52, of Penn North, was just getting off work from his job as a meat cutter when he heard the news. He said he was worried Tuesday when he heard the jury was deadlocked.
"I thought they would find him guilty on some of the charges at least. I think they will try him again. I think he can get a fair trial in the city but the jurors need to pay attention to the evidence and not hurry."
Gardener expected people to be out rallying tonight and trying to keep the neighborhoods calm.
June Johnson was also committed to a non-violent demonstration. Earlier in the day, she handed out fliers for a prayer gathering at Penn North.
"We are one nation and one city," Johnson said. "We're praying to keep the peace, despite how we feel. We will be locking arms and showing our unity."
Baltimore Sun reporters Alison Knezevich, Colin Campbell, Kevin Rector, Andrea McDaniels and Sarah Meehan and Pamela Wood contributed to this report.