File: Virginia Gov. Terry McAuliffe (D) (Steve Helber/AP)

Gov. Terry McAuliffe (D) vetoed a school prayer bill on Friday, saying it could lead to “coercive prayer” or “religious messaging” at school events.

The bill attempted to codify students’ right to pray in school; organize prayer groups, or religious clubs or events; wear clothing or accessories with religious messages; and express religious views at school events.

Proponents of the bill, sponsored by state Sen. Charles W. Carrico, Sr. (R-Grayson County), said it would protect students’ freedom of religious expression. But McAuliffe said in a statement Friday that students already have this freedom.

High schools are required to allow students to organize religious clubs. And students can already discuss religious themes and participate in voluntary prayer or other “non-disruptive expressions of belief,” he said.

He said the bill could subject schools to litigation by creating the potential for school-sponsored religious activities.