Police departments across the country that have spent years boasting about plummeting crime numbers are now scrambling to confront something many agencies have not seen in decades: more bloodshed.

Houston, St. Louis, New Orleans and Baltimore have all seen significant spikes in the number of homicides this year. The totals are up in other cities, too, including New York and Chicago.

"We're in scary territory," said Peter Scharf, a professor at Louisiana State University who tracks homicides in New Orleans.

In Los Angeles, the number of slayings dropped slightly, but the number of shooting victims jumped more than 18 percent. And in Milwaukee, a homicide on Wednesday put the total for the year at 84 - just two fewer than happened in all of 2014.

It's too soon to assess whether the surge in killing marks the start of a trend after years of declines.

But concern is growing that the increase could reflect a confluence of recent shifts, including deepening distrust of police that leads people to settle disputes themselves, officers who are afraid of being second-guessed and court rulings that make it easier than ever to own a gun. Tighter budgets that result in cuts to law-enforcement agencies could also play a role.

Scroll down for video

Rising violence: Antonio Brown, father of Amari Brown, speaks near a sign honoring his son, in Chicago. Seven-year-old Amari was among three people who were shot and killed overnight during a weekend outbreak of gun-related violence in Chicago. Homicides and shooting incidents in Chicago are up roughly 20 percent from the same period last year.

Some of the explanations vary from city to city. In Baltimore, the April death of Freddie Gray, a black man who suffered a fatal spinal-cord injury while in police custody triggered rioting. After six officers were charged in Gray's death, the number of arrests plummeted - a drop that raised questions about whether angry or fearful officers were slowing down their activity on the streets.

Homicides skyrocketed, making May the city's deadliest month in more than 40 years.

Police Commissioner Anthony Batts, who was fired Wednesday, attributed the violence partly to a flood of prescription drugs released into the community by pharmacy looting. He and the police union denied that officers were shirking their duties but acknowledged that police are frustrated.

Other reasons apply more broadly. Police departments all over the country have closely watched the legal attack on stop-and-frisk tactics in New York and the city's subsequent decision to drop its appeal of a ruling by a judge who found the tactic sometimes discriminated against minorities. An American Civil Liberties Union study found similar practices in Chicago, where many observers expect a lawsuit to follow.

"Maybe we don't want hundreds of thousands of people stopped and frisked to get a few guns, and maybe we will have to accept that murders are going to go up 10 percent," said Peter Moskos, a professor at John Jay College of Criminal Justice. "I don't know, (but) we really do have to talk about the trade-offs."

Scharf also noted that the huge drop in homicides that occurred in the 1990s came at about the same time that federal dollars were flowing into police departments. So he wonders if the rise in violence might be tied in some way to the fact that much of that funding has dried up.

The death of Eric Garner in New York at the hands of police and the shooting death of Michael Brown by an officer in Ferguson, Missouri, have contributed to a distrust of police. And that distrust might be proving deadly.

Police say Amari was celebrating July 4 at his father's home on Chicago's West Side when someone opened fire. Police Chief Garry McCarthy says the shot that killed the boy was intended for his father, a "ranking gang member."

"A lot of retaliatory violence occurs because people don't trust police. They don't want to go to police because they don't see police as helping them," said Charis Kubrin, a criminologist at the University of California at Irvine. "Crimes will occur, like a shooting, and no one will speak to police about it. And it just breaks down from there," creating a cycle of violence.

In Milwaukee and Chicago, police chiefs point to what they see as woefully inadequate gun laws that allow people who are repeatedly arrested on weapons charges to win release from custody - often around the same time the police officers are completing the paperwork on the arrest.

"Career criminals with misdemeanor convictions for possession of a firearm can qualify for concealed carry permits," said Milwaukee's chief, Edward Flynn.

In Chicago, the widespread gun violence - more than 500 homicides in 2012 and more than 400 in each of the last two years - has saddled the city with the moniker "Chiraq," which is also the working title of a Spike Lee movie now being filmed.

Meanwhile, the city has suffered legal losses in its efforts to keep guns out of the hands of residents and seen its attempts to stiffen gun laws thwarted by state lawmakers.

A frustrated Police Superintendent Garry McCarthy said the laws are so toothless that gang members are more worried about being beaten up by their gangs for losing a gun than going before a judge after being caught with one.

In the first quarter, police arrested 688 people for illegal firearms. By April 1, 60 percent of those people were already back on the street, McCarthy said.

That frustration boiled over last week when he told reporters that a bullet that killed 7-year-old Amari Brown on July 4 was intended for his father, Antonio, whom police described as a gang member with nearly four dozen arrests, including one in April on a gun-possession charge.