BOSTON (AP) — Massachusetts is making $7.7 million in grant money available to help cities stem gang violence.

Gov. Charlie Baker’s administration says the funding comes from a 13-year-old anti-gang initiative named for the late Sen. Charles Shannon, who was a police officer before being serving in the Massachusetts Legislature.

The grants will be shared among more than two dozen cities along with research institutions. The money can be used for a variety of programs to divert young people away from gangs, and to help pay the costs of establishing anti-gang task forces within police departments.

The largest grant of more than $1.5 million will go to Boston. The city’s police commissioner, William Gross, says the Shannon funding has contributed to an overall decrease in youth and gang violence in recent years.