One of the nation’s largest medical waste disposal firms has settled with five local public entities among the hundreds across the state that it has been accused of overcharging for its services.

Stericycle, based in Lake Forest, Ill., will pay a total of $2.4 million in compensation to various police and fire departments, rescue squads, schools, jails and hospitals, according to State Attorney General Eric T. Schneiderman.

The local entities that will be compensated as a result of the settlement are Wyoming Correctional Facility in Attica, $12,932; the Lancaster Police Department, $8,601; Collins Correctional Facility, $6,311; the Marilla Fire Company, $4,540; and the Buffalo Police Department, $4,107.

According to the State Attorney General’s Office, since 2003, Stericycle implemented a plan to charge automated price increases without giving notice to its customers, which is a violation of its contract.