Following a spate of recent homicides in the city, Boston police have increased patrols and placed close to two dozen alleged criminals behind bars.

According to BPD Commissioner Ed Davis, gun violence and drug and gang activity have led to an increase in homicides the last few weeks.

Over the weekend, Davis addressed the city saying police presence in parks and public areas would be increased to put an end to the violence.

Boston police also arrested 22 criminals Friday as part of their approach to quell the rise in drug crime.

With the help of the Youth Violence Strike Force and the Drug Control Unit the BPD rolled out “Operation Summer Sweep” in conjunction with “Operation Bad Rap” to put criminals with outstanding warrants who “impact the quality of life in Boston” in jail.

Police said charges from those arrests ranged from drug trafficking and distribution to assault and battery.

All 22 suspects will be arraigned in various district courts around the city to face individual charges, according to police reports.

Davis said undercover operations currently going on in the city would have an impact on the violence in the weeks to come.

Police also identified three victims from the July 4 week, which pushed the homicide rate to 24 deaths to date.