The Baltimore mayor fired the troubled city's police commissioner Wednesday, saying that a recent spike in homicides weeks after an unarmed black man died of injuries in police custody required a change in leadership.

Mayor Stephanie Rawlings-Blake thanked Police Commissioner Anthony Batts for his service — and praised the job he had done — but said growing criticism of his leadership had become a "distraction" that was preventing the city from moving ahead.

Deputy Police Commissioner Kevin Davis, who has only been with the department since January, will serve as interim commissioner, Rawlings-Blake said.

"We need a change," the mayor told a news conference, which was attended by Davis by her side. "This was not an easy decision but it is one that is in the best interest of Baltimore. The people of Baltimore deserve better and we're going to get better."

The firing comes 2 1/2 months after the city broke out into riots following the death of Freddie Gray, who died in April of injuries he received in police custody. Six police officers have been criminally charged in Gray's death.

After the violence, arrests in the city plummeted and homicides spiked. On Tuesday night, gunmen jumped out of two vans and fired at a group of people a few blocks from an urban university campus, killing three people. A fourth person sought treatment for a gunshot wound to the buttocks and was in stable condition.

Police said Wednesday that the shooting wasn't random, but no arrests have been made.

"As we have seen in recent weeks, too many continue to die on our streets, including three just last night and one earlier today," Rawlings-Blake said. Referring to Batts, she said that "recent events proved that his being here was a distraction."

"A key goal of my administration is making Baltimore a safer place. We cannot continue to debate the leadership of the department. We cannot continue to have the level of violence we've seen in recent weeks in this city. We have made progress; I don't want to lose that progress."

On Tuesday, the police department announced that an outside organization will review the department's response to the civil unrest that followed Gray's death. Most of the unrest took place on April 27, prompted by Gray's death on April 19. In the meantime, the U.S. Justice Department is conducting a civil rights review of the department, and Batts has been criticized by the Baltimore police union.

The mayor said that in addition to reducing crime, Davis would "bring accountability to police, hold officers who act out of line accountable for their actions."

In his own remarks to the news conference, Davis said his goals would also include improving the relationship with the officers who work for him. "A relationship must exist with the rank and file," he said. "I will walk with them and serve with them and be with them every step of the way."

Davis was previously chief of police in Anne Arundel County, Maryland, and assistant chief in Prince George's County, Maryland. He joined the Prince George's department in 1992 and worked his way up the ranks.

He led the Anne Arundel department for a year and half, coming in after political scandals involving a county executive and a police chief. Davis resigned from the Anne Arundel department in December after the election of a new county executive.

Rawlings-Blake appointed Batts as police commissioner in September 2012.

His contract with the city paid him $190,000 and was to run through June 2020. It includes a provision for a severance payment equal to his annual salary if he is terminated without cause.

Batts had more than three decades of experience in law enforcement, according to his biography on the Baltimore Police Department website. He started his career in 1982 as an officer with the Long Beach department, working his way up to chief over a 20-year span. He also served as city manager of Long Beach for four months and taught at California State University, Long Beach. He was chief in Oakland for two years, from 2009 to 2011.