Heated political debates that center on marginalized communities can lead to negative consequences for students, according to a new study that found an uptick in anti-LGBTQ bullying at California schools during a statewide push to ban same-sex marriage.

The study, published in the journal Pediatrics, suggests that high-profile debates involving marginalized groups can lead bullies to target young people who are central to those conversations.

The 2008 California voter referendum, Proposition 8, restricted same-sex marriage in the state. The referendum was later struck down, and in 2015 the U.S. Supreme Court ruled in favor of same-sex marriage nationwide. However, researchers argue that the findings offer cause for concern when lawmakers and the public engage in divisive policy debates — such as those surrounding efforts to heighten immigration enforcement — that target marginalized populations.

“Racism and homophobia is real, and deploying it for political gain … is damaging for people who are marginalized,” said Stephen Russell, a professor in child development at the University of Texas at Austin and co-author of the report. “That’s the biggest advice: Don’t do it. Please don’t be homophobic or discriminatory.”

For the study, researchers analyzed middle and high school student surveys from more than 5,000 California campuses between 2001 and 2015. The California Healthy Kids Survey asked students whether they were bullied or harassed at school because they are gay or lesbian, or because someone perceived them to be. While student surveys indicated an uptick in anti-LGBTQ bullying in the years leading up to the voter referendum, harassment rates began to decline in the years after Proposition 8 was approved. Public discourse about same-sex marriage faded after the referendum was approved, Russell said, which likely contributed to the decline in anti-LGBTQ bullying in subsequent years.

During the 2001-02 school year, roughly 8 percent of students reported homophobic bullying. But the 2008-09 school year “served as a turning point in homophobic bullying,” according to the report. That year, when voters approved Proposition 8, the rate of such bullying jumped to nearly 11 percent. This spike occurred against the backdrop of declines in other types of bullying, including discrimination based on race or religion.

During its peak, the number of students who reported homophobic bullying exceeded the estimated population of LGBTQ youth in California schools, suggesting straight students were also targeted with abuse.

Though troubled by the trends, Russell said he wasn’t surprised. He pointed to an advertising campaign on television before the Proposition 8 vote that alleged schools were indoctrinating students to promote an LGBTQ agenda.

Though less comprehensive, another recent study documented a connection between divisive political rhetoric and student bullying. The study, published in January in the journal Educational Researcher, found a spike in school bullying incidents in Virginia counties that voted for President Donald Trump during the 2016 election. School bullying was stagnant in counties, however, where Democratic challenger Hillary Clinton won.

• Read more: Study on Post-Election Student Bullying Adds Teeth to Concerns Over ‘Trump Effect’

Despite the chief findings, the study on California bullying offered up at least one promising sign. California schools with Gay-Straight Alliance clubs, designed to foster supportive school climates for LGBTQ students, didn’t experience a similar increase in anti-LGBTQ bullying. Though previous research suggests that the presence of Gay-Straight Alliances at schools leads to positive student outcomes, Russell said his report adds to the literature in favor of the clubs.

However, he said schools should do more to support LGBTQ youth. Anti-bullying initiatives in schools, he said, could do more to address prejudice and discrimination directly.

“Most teachers were not trained to think about anti-oppression education and how to do it and what it means in schools,” he said. “There’s a lot of work to do to think about how — through education policy — we can promote non-bias and anti-discrimination in schools.”

This article was published in partnership with The 74. Sign up for The 74’s newsletter here.