CHICAGO — Amid the flash and bang of fireworks, gunshots from 47 separate shootings echoed through this city over the extended Fourth of July weekend, killing 11 and wounding dozens more, including a 5-year-old boy. The events were a sober reminder to residents that despite a drop in homicides this year, gaining control over gun violence in Chicago will be a long road, and the political pressure it has put on Mayor Rahm Emanuel’s first term is far from over.

“It’s a day-by-day, minute-by-minute crime,” Garry F. McCarthy, the Chicago police superintendent, said at a news conference on Monday. “Yes, we’re seeing great response to our efforts to build a deeper partnership with the communities and the residents that we serve, but we know there’s more work to be done.”

Homicides in Chicago drew national attention last year after a spike in gun violence and gang activity contributed to more than 500 deaths, exceeding the level of bloodshed in the country’s two larger cities, New York and Los Angeles. But the city has been encouraged by a 24 percent reduction in shootings so far this year (from 1,193 to 909) and 28 percent reduction in homicides (from 276 to 200) — an improvement officials attribute partly to an increased police presence, with as many as 400 officers a day patrolling the most dangerous areas. The police say the violence is mostly gang related and in a small number of neighborhoods on the city’s South and West Sides.

In the first week of July, the police say, there were 65 shootings across the city, down from 76 over the same period in 2012. Sixteen people were killed last week, the same as in 2012. In New York City, where homicides are also down this year, there were 38 shootings and seven fatalities last week.