National Guardsmen have fanned out across the city, police with riot shields blocked streets, and firefighters doused smouldering blazes after looting and arson erupted in Baltimore following the funeral of a black man who died in police custody.
It was the first time the National Guard was called in to quell unrest in Baltimore since 1968, when some of the same neighbourhoods were convulsed by violence after the assassination of the Rev Martin Luther King Jr.
The rioting started in West Baltimore on yesterday afternoon - within a mile of where Freddie Gray, 25, was arrested and placed into a police van earlier this month - and by midnight had spread to East Baltimore and neighbourhoods close to downtown and near the baseball stadium. The streets were calm this morning.
At least 15 officers were hurt, including six who were taken to hospital, police said. There were 144 vehicle fires, 15 structure fires and nearly 200 arrests, the mayor's office said.
Mr Gray's death under still-mysterious circumstances has become the latest flashpoint in the debate across the US over the use of police force against black men.
The rioting was the worst such violence in the US since the turbulent protests that broke out over the death of Michael Brown, the unarmed black 18-year-old who was shot by a white police officer in Ferguson, Missouri, last summer.
Aerial footage showed a firefighter spraying the burned-out shell of a large building.
The city was under a 10pm to 5am curfew beginning today, and all Baltimore public schools were closed.
"I understand anger, but what we're seeing isn't anger," mayor Stephanie Rawlings-Blake lamented. "It's disruption of a community. The same community they say they care about, they're destroying. You can't have it both ways."
State and local authorities pledged to restore order but found themselves responding to questions about whether their initial response had been adequate.
Ms Rawlings-Blake waited hours to ask the governor to declare a state of emergency, and the governor hinted she should have come to him earlier.
"We were all in the command centre in the second floor of the state House in constant communication, and we were trying to get in touch with the mayor for quite some time," governor Larry Hogan said. "She finally made that call, and we immediately took action."
Ms Rawlings-Blake said officials initially believed they had gotten the unrest under control, "and I think it would have been inappropriate to bring in the National Guard when we had it under control".
But the rioters set police cars and buildings on fire, looted a mall and liquor stores and threw rocks, bottles and bricks at police in riot gear. Police responded occasionally with pepper spray.
"They just outnumbered us and outflanked us," Baltimore police commissioner Anthony Batts said. "We needed to have more resources out there."
The governor said he was temporarily moving his office from Annapolis to Baltimore on Tuesday.
Major General Linda Singh, adjutant general of the Maryland National Guard, said up to 5,000 troops would be available for Baltimore's streets.
"We are going to be out in massive force, and that just means basically that we are going to be patrolling the streets and out to ensure that we are protecting property," Maj Gen Singh said.
Maryland Representative Elijah Cummings and about 200 others, including ministers, tried unsuccessfully to quell the violence at one point last night, marching arm-in-arm through a neighbourhood littered with broken glass, flattened aluminium cans and other debris.
As they got close to a line of police officers, the marchers went down on their knees. They then rose to their feet and walked until they were face-to-face with the police officers, who were in a tight formation and wearing riot gear.
But the violence continued, with looters later setting a liquor store on fire and throwing cinderblocks at fire engines as firefighters tried to put out the blazes.
Mr Gray was arrested on April 12 after running away at the sight of police, authorities said. He was held down, handcuffed and loaded into a van. Leg cuffs were put on him when he became irate inside. He died of a spinal cord injury a week later.
Authorities said they are still investigating how and when he suffered the injury - during the arrest or while he was in the police van, where authorities say he was riding without being belted in, a violation of department policy.
Six officers have been suspended with pay while the investigation continues.
The riot came amid a national furore over the deaths of several black men at the hands of police - from the Brown case in Ferguson to the chokehold death of Eric Garner in New York and the shooting of Walter Scott in North Charleston, South Carolina.
While they are angry about what happened to Mr Gray, his family said riots are not the answer.
"I think the violence is wrong," Mr Gray's twin sister, Fredericka Gray, said. "I don't like it at all."