Rachel Whalen remembers feeling gutted in high school when a former friend would mock her online postings, threaten to unfollow or unfriend her on social media and post inside jokes about her to others online.

The cyberbullying was so distressing that Whalen said she contemplated suicide. Once she got help, she decided to limit her time on social media. It helps to take a break from it for perspective, said Whalen, now a 19-year-old college student in Utah.

There’s a rise in cyberbullying nationwide, with three times as many girls reporting being harassed online or by text message than boys, according to the National Center for Education Statistics.

The U.S. Department of Education’s research and data arm this month released its latest survey, which shows an uptick in online abuse, though the overall number of students who report being bullied stayed the same.

“There’s just some pressure in that competitive atmosphere that is all about attention,” Whalen said. “This social media acceptance — it just makes sense to me that it’s more predominant amongst girls.”

Many school systems that once had a hands-off approach to dealing with off-campus student behavior are now making cyberbullying rules, outlining punishments such as suspension or expulsion, according to Bryan Joffe, director of education and youth development at AASA, a national school superintendents association.

That change partly came along with broader cyberbullying laws, which have been adopted in states like Texas and California in recent years.

The survey showed about 20 percent, or one in five students, reported being bullied, ranging from rumors or being excluded to threats and physical attacks in the 2016-17 school year. That’s unchanged from the previous survey done in 2014-15.

But in that two-year span, cyberbullying reports increased significantly, from 11.5 percent to 15.3 percent.

Broken down by gender, 21 percent of girls in middle and high school reported being bullied online or by text message in the 2016-17 school year, compared with less than 7 percent of boys.

That’s up from the previous survey in 2014-15, the first time cyberbullying data was collected this specifically. Back then, about 16 percent of girls between 12 and 18 said they were bullied online, compared with 6 percent of boys.

The survey does not address who the aggressors are, though girls were more likely to note that their bullies were perceived to have the ability to influence others.