If an action is brought against a law enforcement officer because of damage caused by a dog which said officer was caring for or maintaining in connection with his official duties, the commonwealth or the political subdivision employing said officer shall indemnify him for expenses or damages incurred in the settlement or defense of such action; provided that in the case of an officer employed by the commonwealth the settlement or defense of such case shall have been made by the attorney general, and that in the case of an officer employed by a city or town such settlement or defense shall have been made by the city solicitor or town counsel or by an attorney legally employed for the purpose by a city or town.
Mass. Gen. Laws ch. 140, § 155A