Mr. Emanuel listed safer streets among his top three priorities when he became mayor a year ago, but Chicago, the nation’s third-largest city, is now testing that promise. Homicides are up by 38 percent from a year ago, and shootings have increased as well, even as killings have held steady or dropped in New York, Los Angeles and some other cities. As of June 17, 240 people had been killed here this year, mostly in shootings, 66 more deaths than occurred in the same period in 2011.
      
“That’s somebody’s husband, somebody’s son, and they’re dying right on our block,” said Maya Hodari, who lives on a South Side street where two shootings have already taken place this year, one of them fatal and another as a toddler looked on. “It hurts.”
The violence has left its largest scars in some of Chicago’s most impoverished, struggling neighborhoods on the South and West Sides, places with views of the city’s gleaming downtown skyline that feel worlds apart. Wealthier, whiter parts of the city have not been entirely immune — shootings were reported in the last few days along the city’s Magnificent Mile shopping district and near the Lincoln Park Zoo — but a majority of the killings have been tied to Chicago’s increasingly complicated gang warfare, police statistics suggest, and to the gritty neighborhoods where gangs have long thrived.
      
There is no evidence of a broader crime wave; in fact, measures of crime apart from homicides, including rapes, robberies, burglaries and auto thefts, have actually improved by about 10 percent since a year ago.
“We’ve got a gang issue, specific to parts of the city, and we have a responsibility to bring a quality of life to those residents, and we are going to do it,” Mayor Emanuel, visibly vexed, said in an interview on Friday.
“My bigger issue is not only the homicides and shootings,” he added. “It’s what it does to all the legitimate citizens in that community and the kids.”
Gangs in this city have changed over the decades, splintering from a small set of well-established bands into hundreds of tinier groups with alliances so disparate and shifting that even a former Gangster Disciple member from the West Side, who refused to be named but revealed bullet scars during an interview as proof of his rougher days, said he could not begin to keep them all straight. In just the last two years, the police say, 500 monitored gang factions have fractured into more than 600, many of them with stunningly ready access to guns.
      
In one neighborhood last week, plainclothes officers searched parking lots and old addresses for 30 suspects as part of Superintendent McCarthy’s larger race to dismantle drug and gang operations. At one point, they said, they found themselves staring at a gun aimed at them by a man who was not even on the list of suspects they were searching for. Moments later, the gun lay shining on the ground, an officer’s shot left a bullet hole in a nearby car, and the man, 21, was added to the list of those arrested in the sweep — all before 11 a.m.
As in most of the nation’s big cities, killings have dropped precipitously in Chicago since the 1990s, as the police tried new approaches and crack cocaine faded. In the early 1990s, more than 900 people were killed annually here, a number that has long since shrunk and hovered around the 400s.
Homicides are down so far this year in New York and in Los Angeles, a fact that Mayor Michael R. Bloomberg’s administration in New York has pointed to in defense of that city’s controversial stop-and-frisk program. But Chicago is not alone among major cities dealing with more killings. In Philadelphia, for instance, 173 homicides were reported as of June 20, compared with 143 in the same period last year.
      
Experts on crime say it is too early to know how much to make of the rise in killings here, particularly since a significant number took place in the first three months of the year — an oddly warm stretch for a city accustomed to winter hibernation and an accompanying chill in crime.
Mr. Emanuel’s critics blame his budget choices, at least in part. He consolidated three police districts, combined the police and fire headquarters, and reduced police spending by $67 million — mostly, his aides say, by removing more than 1,300 department jobs that had long gone unfilled but were left in city budgets only to be held up as savings on paper. Police union leaders argue that Mr. Emanuel should instead have filled any empty slots, however long they had been empty, with additional officers, and assert that the city has also failed to fill hundreds of slots left by retiring officers in recent years.
      
“Every district in the city is running short on manpower,” said Pat Camden, a Fraternal Order of Police spokesman. “It’s penny-wise and dollar foolish.”
But Superintendent McCarthy, who was director of police in Newark and deputy commissioner of operations in New York before Mayor Emanuel brought him here, says that the department’s new philosophy — one that includes a sharp focus on statistics and on building a deep knowledge within neighborhoods — is now aimed squarely at the gang problem, and that cost savings were matters of improving the department’s effectiveness, not shrinking it.
Nearly 1,100 officers who had been in administrative jobs or in special units have been sent back into police districts to work in neighborhoods. “Audits” of gangs — including details about members, turf fights and old grudges — are being used to try to prevent retaliation shootings.
      
The police this year have written tens of thousands more “contact cards” than last year, a practice in which officers stop people (though they do not, officials say, generally frisk them), document gang affiliations for a central database and seek information about recent crimes. The department is hiring officers for jobs vacated by retirements, Superintendent McCarthy said, though about 450 positions on the city’s 12,538-person sworn force are now unfilled.
Mr. Emanuel said he was drawing on his experience in Washington with the 1994 crime bill in efforts to pour resources into the roots of crime that stretch beyond police work. He has added $8.5 million collected from unpaid debts owed the city for thousands more summer jobs, slots for campers in the city’s park district and apprentice programs. Stricter curfews have been set. And the city is working with community groups in areas like Ms. Hodari’s neighborhood to build residents’ willingness to speak up and reclaim areas.
      
Not all of it seems to be reaching places like a district on the West Side, where a cluster of young men jumped from their cars on a recent morning to scuffle in the street, and where 24 homicides have already taken place this year. Tawaila Medley said she sees from the windows of the laundry where she works clusters of pre-teenage boys gathering at all hours of the night, and is grateful for the silent, out-of-view alarm beside her, adding, “We’ve lost our way.”

Steven Yaccino contributed reporting.