Besieged by the nation’s highest big-city murder rate, Baltimore named a new police commissioner for the third time in five years on Friday, with the mayor saying she was “impatient” for change. The surprise move came as the city struggles to control the violence that took the lives of almost 900 residents during the two-and-a-half-year tenure of the last chief, Kevin Davis, who was fired on Friday.

The new commissioner, Darryl De Sousa, 53, inherits a long list of problems that have proved intractable for predecessors, including a near-total lack of trust of the police in many neighborhoods and stunning levels of privation along the city’s most violent streets, even as employment rates have improved and areas like the Inner Harbor have become gleaming tourist destinations.

“We need the numbers to go down faster than they are,” Mayor Catherine Pugh, who has been in office for a year, said at a news conference announcing the change.

For its long-troubled police force, the city has tried an outsider from California via Harvard, who was seen as an agent of change, then a Marylander who was chief of police in a neighboring county. Now, it has changed tack again, appointing in Mr. De Sousa, an insider who has served in the department for 30 years.