LOS ANGELES, Calif.–Gov. Jerry Brown today signed a school safety bill prohibiting disruptive messages that threaten the physical safety of school children in preschool, elementary or middle schools.

The legislation was written by Assemblyman Tony Mendoza, D-Norwalk, who said he wrote the law because as a former teacher “I know how important student safety is for the success of our schools.”

A March 2003 demonstration outside a middle school by the Center for Bio-Ethical Reform was also a factor, officials said.

The protest included billboard-sized graphic photographs of aborted fetuses. Students became agitated and some became angry, some cried, and others stared while standing in the streets and on the sidewalk, creating a traffic safety hazard.

The demonstrators were detained.

The center filed a lawsuit and won an appeal in the Ninth Circuit Court of Appeals. The court said that if the California Legislature adopted statutory language to address such situations, it might change the outcome of such cases.

Mendoza wrote the law to do just that.

Gov. Arnold Schwarzenegger vetoed a similar measure by Mendoza last year.