BALTIMORE — Baltimore Police Commissioner Anthony Batts was fired on Wednesday following criticism of his handling of rioting over the death of a black man from an injury in police custody and a skyrocketing homicide rate.

Mayor Stephanie Rawlings-Blake said the focus on Batts and the leadership of the 2,500-officer force had become a distraction in fighting resurgent crime and was hurting her goal of attracting families to the city.

“As we have seen in recent weeks, many continue to die. Families are tired of feeling the pain, and so am I,” she said at a City Hall news conference.

Batts’ firing came after three people were shot dead overnight and another was killed on Wednesday, violence cited by the mayor at her news conference.

Batts, who came to Baltimore from California in September 2012 with a reputation as a reformer, will be replaced on an interim basis by Deputy Commissioner Kevin Davis.

Batts came under fire for his handling of rioting that followed the funeral of Freddie Gray, 25, on April 27.

Gray died after suffering injuries while being transported in a police van, heightening a national debate on police treatment of minorities. Six officers have been charged in his death.

Batts and other police commanders told officers to “hold the line” with rioters rather than confront people causing damage or threatening police.

Officials have said the orders were aimed at protecting officers and bystanders. About 160 officers were hurt in the rioting, almost 400 buildings were destroyed or damaged, and the National Guard was sent in to restore order.

His cautious response was seen as an improvement over other cities, such as Ferguson, Missouri, that had used heavy-handed tactics to shut down protests after complaints of police brutality against black men. But Batts came under criticism for not being better prepared for the rioting.

A review by Baltimore’s police union released on Wednesday criticized the police response. It said commanders let unrest spiral into arson and looting, and officers lacked riot gear and training.

A spokesman for Rawlings-Blake called the review “a trumped-up political document.”

Apology to officers

Batts apologized to officers in May, saying he put them in harm’s way.

Batts also had to grapple with an upsurge in killings after the rioting in the largely black city of 620,000 people. Baltimore has tallied 155 killings for the year versus 105 in the same period in 2014, police said on Wednesday.

Batts blamed the upturn to the looting of pharmacies during and after the rioting, leading to turf wars among drug gangs.

Davis, the interim commissioner, came to Baltimore in January after serving as police chief in Anne Arundel County Maryland. At the City Hall news conference, he said: “It’s all about the crime fighting and the relationship with the community.”

Batts had been police chief in Oakland and Long Beach, California. He began his career in 1982 in Long Beach and from there went to Oakland, which, like Baltimore, has one of the highest homicide rates in the country.

Billy Murphy, an attorney for Gray’s family, praised Batts for trying to change “an entrenched racist police culture and its horrible blue wall of silence which made good cops afraid to tell on bad cops. But he did not succeed.”

Batts’ firing came a day before a 20,000-strong faith coalition, Baltimoreans United in Leadership Development, planned to ask for his resignation.

The Rev. Andrew Foster, the group’s clergy co-chair, said Batts did not have a plan to address the mayhem and had lost support among the police rank and file.

“That felt like a dangerous situation to us and we were ready for a change,” he said.