By Scott Malone and Ian Simpson
BALTIMORE (Reuters) - Thousands of police and National Guard troops fanned out across Baltimore on Tuesday night to enforce a new curfew and prevent further violence, while the mayor fended off criticism that she responded sluggishly to a night of rioting, looting and fires.
A day after the worst rioting in the United States in years, more than 3,000 police took up posts in front of businesses and hospitals with less than 30 minutes before a citywide 10 p.m. EDT curfew takes effect.
On Monday, shops were looted, buildings burned to the ground, 20 officers were injured and police arrested more than 250 people in the violence following the funeral of a 25-year-old black man who died in a hospital on April 19 a week after sustaining injuries in police custody.
The death of Freddie Gray gave new energy to the public outcry that flared last year after police killings of unarmed black men in Ferguson, Missouri; New York City and elsewhere.
Just ahead of the curfew, there were still hundreds people on the streets and Mayor Stephanie Rawlings-Blake pleaded with people to go home and police said no exceptions would be made to the curfew except for medical emergencies and work.
"Let's take our babies home and abide by the curfew. I want to thank you for understanding that we want to bring peace," Rawlings-Blake said through a megaphone on Pennsylvania Avenue, near the scene of Monday night's worst looting.
Earlier, as night fell, hundreds of protesters chanted "Black Lives Matter," and there were also scenes of reconciliation, clean-up and even celebration.
Near a looted and burned-out CVS pharmacy, hundreds of people waved flags and swayed in the street as they watched 50 dancers gyrating to the drumming of a unity band put together for the evening from music groups from all over the city.
"It feels good to see everyone coming together. People just enjoying themselves," said Roxanne Gaither, 45. "This is what Freddie Gray would have wanted to see. Last night was terrible if a curfew is what it takes to avoid that, so be it."
For nearly a week after Gray died from a spinal injury, protests in Baltimore had been peaceful and Rawlings-Blake said she acted cautiously on Monday to avoid a heavy-handed response that would incite more violence.
"It's a very delicate balancing act, when we have to make sure that we're managing but not increasing and escalating the problem," said Rawlings-Blake, 45, an African-American and Democrat who grew up in the city 40 miles (64 km) from Washington, D.C.
Maryland Governor Larry Hogan said he had called Rawlings-Blake repeatedly Monday but that she held off requesting the National Guard until three hours after looting started in the largely black city of 620,000.
The security crisis disrupted the city's daily routines. Schools were closed on Tuesday, but were scheduled to reopen on Wednesday. In a rare move, the Major League Baseball game between the Baltimore Orioles and Chicago White Sox will be played as scheduled Wednesday but closed to the public.
Gray was arrested on April 12 while running from officers. He was taken to the police station in a van, with no seat restraint and suffered a spinal injury.
Six officers have been suspended, and the U.S. Justice Department is investigating possible civil rights violations.
"There's no excuse for the kind of violence that we saw yesterday," said President Barack Obama, who said he spoke to the governor and the mayor. "It is counterproductive."
Obama also said at a news conference the problems in places such as Baltimore were not new and need to be addressed by everyone.
"We can't just leave this to the police," Obama said, adding that "we as a country have to do some soul searching. This is not new. It's been going on for decades."
Almost a quarter of people in Baltimore live below the poverty line and decayed, crime-ridden areas of the city inspired the gritty television police drama "The Wire."
Monday's clashes in Baltimore were reminiscent of rioting in Ferguson, Missouri, in 2014 after authorities declined to indict a white police officer who shot dead an unarmed black teenager.
Police in Ferguson came under intense criticism last year for quickly adopting a militarised posture, using armoured vehicles, showing heavy weapons and using tear gas.
Baltimore police Captain John Kowalczyk told reporters that the city had prepared for protests by teenagers on Monday. But as the violence increased, older people were involved.
(Additional reporting by Jim Bourg and Warren Strobel in Baltimore, Laila Kearney in New York, Dan Whitcomb in Los Angeles and Suzannah Gonzales and Tracy Rucinski in Chicago; Writing by Mary Milliken and Fiona Ortiz; Editing by Lisa Shumaker and Grant McCool)