BOSTON (AP) -- Police chiefs in 54 Massachusetts communities have signed an agreement that makes it easier for officers in one community to cross town lines while responding to legitimate law enforcement emergencies in another jurisdiction.

The mutual aid agreement announced Tuesday involves 51 Middlesex County departments, two from Essex County and one from Norfolk County.

The chiefs say the agreement enhances public safety and protects officers.

It essentially says on-duty officers from one participating department can cross town lines to respond to a crime in progress in another participating community.

Civil authorities in the towns have approved of the agreement.

The agreement was a response to two Supreme Judicial Court cases, including one in which drunken driving charges were dismissed because an officer followed the suspect across town lines.