PHOENIX (AP) Arizona Gov. Katie Hobbs has vetoed a bill that would have compelled schools not to refer to transgender students by the names or pronouns they identify with.

Hobbs announced the veto Monday afternoon, saying the legislation was an attack on transgender children.

Instead of coming up with new ways to target and isolate our children, we should be working together to create an Arizona where everyone has the freedom to be who they are without fear of harassment or judgement, she said in a statement.

Under the bill, employees or independent contractors of a school district or charter school would be prohibited from knowingly calling a student age 18 or younger by a pronoun other than the one assigned to them at birth. They also could only address them with the first or middle name listed on school records.

Exceptions would have been allowed with parental permission.

Republican State Sen. John Kavanagh, the bill’s sponsor, previously said this proposal was about making sure parents were aware their children wanted to identify by another name or pronoun.

Opponents of the bill say students should have the freedom to express whatever gender identity without permission.

Transgender rights have become a target in GOP-majority state legislatures like Arizona. Last year, then-Gov. Doug Ducey signed a law banning trans girls from participating in school sports.