A California judge has banned one of the state's school districts from imposing a policy that would have required teachers and staff to notify parents if their student declares they want to change their name or pronouns.

San Bernadino County Judge Michael Sachs issued a preliminary injunction against the policy last year, and the court has now formally struck down most of the plan. The judge allowed part of the policy that required parental notification if a student's name or pronoun is formally changed in the school's records.

The ruling comes more than a month after California Gov. Gavin Newsom signed legislation that prevented schools from implementing notification requirements in July.

AB 1955 won praise from LGBTQ+ advocacy groups who say the ban will help protect transgender and gender-nonconforming students who live in unwelcoming households.

HARRIS FINALLY ADDS POLICY PAGE TO CAMPAIGN WEBSITE, DEVOTES SEVERAL SECTIONS TO TRUMP

Gavin Newsom/Classroom

California Gov. Gavin Newsom has pushed back on efforts to notify parents if their children are going by different names or pronouns at school. (Getty Images)

Tony Hoang, executive director of LGBTQ+ advocacy group Equality California, called the legislation "critical" for strengthening protections for LGBTQ+ youth against parental notification policies.

NEWSOM ATTACKS DEMOCRACY IN CALIFORNIA, BUT WANTS TO TAKE THAT NATIONAL

The conservative California Family Council said the law violates parents' rights, however.

"This bill undermines their fundamental role and places boys and girls in potential jeopardy," Jonathan Keller, the council's president, said in a statement. "Moms and dads have both a constitutional and divine mandate to guide and protect their kids, and AB 1955 egregiously violates this sacred trust."

Newsom in Michigan

Parental rights groups say Newsom's law is harmful to children. (Don Campbell/The Herald-Palladium via AP)

CLICK HERE TO GET THE FOX NEWS APP

The new law came after several school districts in California passed policies requiring that parents be notified if a child requests to change their gender identification. That led to pushback by Democratic state officials, who say students have a right to privacy from their parents.