Section 34A. Every contract for the construction, alteration, maintenance, repair or demolition of, or addition to, any public building or other public works for the commonwealth or any political subdivision thereof shall contain stipulations requiring that the contractor shall, before commencing performance of such contract, provide by insurance for the payment of compensation and the furnishing of other benefits under chapter one hundred and fifty-two to all persons to be employed under the contract, and that the contractor shall continue such insurance in full force and effect during the term of the contract. No officer or agent contracting in behalf of the commonwealth or any political subdivision thereof shall award such a contract until he has been furnished with sufficient proof of compliance with the aforesaid stipulations. Failure to provide and continue in force such insurance as aforesaid shall be deemed a material breach of the contract and shall operate as an immediate termination thereof. No cancellation of such insurance, whether by the insurer or by the insured, shall be valid unless written notice thereof is given by the party proposing cancellation to the other party and to the officer or agent who awarded the contract at least fifteen days prior to the intended effective date thereof, which date shall be expressed in said notice. Notice of cancellation sent by the party proposing cancellation by registered mail, postage prepaid, with a return receipt of the addressee requested, shall be a sufficient notice. An affidavit of any officer, agent or employee of the insurer or of the insured, as the case may be, duly authorized for the purpose, that he has so sent such notice addressed as aforesaid shall be prima facie evidence of the sending thereof as aforesaid. This section shall apply to the legal representative, trustee in bankruptcy, receiver, assignee, trustee and the successor in interest of any such contractor. The superior court shall have jurisdiction in equity to enforce this section.
Whoever violates any provision of this section shall be punished by a fine of not more than one hundred dollars or by imprisonment for six months, or both; and, in addition, any contractor who violates any provision of this section shall be prohibited from contracting, directly or indirectly, with the commonwealth or any political subdivision thereof, for the construction, alteration, demolition, maintenance or repair of, or addition to, any public works or public building for a period of two years from the date of conviction of said violation.