Section 12A. (a) No operator of a vehicle or vessel used in public transportation, including a train, passenger bus, school bus or other vehicle used to transport pupils, passenger ferry boat, water shuttle or other equipment used in public transportation owned by, or operated under the authority of the Massachusetts Bay Transportation Authority, the Woods Hole, Martha’s Vineyard and Nantucket Steamship Authority, Massachusetts Port Authority, or the Massachusetts Department of Transportation, shall use a mobile telephone, hands-free mobile telephone or other mobile electronic device while operating such vehicle or vessel; provided, however that this section shall not apply to the operator of a vehicle or vessel used in public transportation using a mobile telephone, hands-free mobile telephone or mobile electronic device in the performance of the operator’s official duties; provided, however, that in order for the use of any such device to be made “in the performance of the operator’s official duties,” such use must have been made in conformance with applicable written guidelines issued by a public entity listed in this paragraph relative to circumstances when operators are permitted to use said devices in the performance of their official duties or pursuant to directives from federal authorities having regulatory jurisdiction over such public entity’s operations.

Whoever violates this section shall be punished by a fine of $500. A violation of this section shall not be a moving violation for purposes of the safe driver insurance plan under section 113B of chapter 175.

(b) It shall be an affirmative defense for an operator under this section to produce evidence that the use of a mobile telephone that is the basis of the alleged violation was in the case of an emergency. For the purpose of this paragraph, an emergency shall mean that the operator needed to communicate with another to report any of the following: (1) that the vehicle or vessel was disabled; (2) that medical attention or assistance was required on the vehicle or vessel; (3) that police intervention, fire department or other emergency services was necessary for the personal safety of a passenger or to otherwise ensure the safety of the passengers; or (4) that a disabled vehicle or an accident was present on a roadway.