If an insured person who has complied with the rules, regulations and demands of the insurer is required by a judgment of a court to pay to an employee any damages on account of personal injury sustained by such employee during the period covered by insurance, the insurer shall pay to the insured the full amount of such judgment and the cost assessed therewith if the insured shall have given the insurer written notice of the bringing of the action in which the judgment was recovered and an opportunity to appear and defend the same.
Mass. Gen. Laws ch. 152, § 25