CHICAGO — An increase in suicide rates among US teens occurred at the same time social media use surged and a new analysis suggests there may be a link.

Suicide rates for teens rose between 2010 and 2015 after they had declined for nearly two decades, according to data from the federal Centers for Disease Control and Prevention. Why the rates went up isn’t known.

The study doesn’t answer the question, but it suggests that one factor could be rising social media use. Recent teen suicides have been blamed on cyberbullying, and social media posts depicting “perfect” lives may be taking a toll on teens’ mental health, researchers say.

“After hours of scrolling through Instagram feeds, I just feel worse about myself because I feel left out,” said Caitlin Hearty, a 17-year-old Littleton, Colorado, high school senior who helped organize an offline campaign last month after several local teen suicides.

“No one posts the bad things they’re going through,” said Chloe Schilling, also 17, who helped with the campaign, in which hundreds of teens agreed not to use the internet or social media for one month.

The study’s authors looked at CDC suicide reports from 2009 to 2015 and results of two surveys given to US high school students to measure attitudes, behaviors and interests. About half a million teens ages 13 to 18 were involved. They were asked about use of electronic devices, social media, print media, television and time spent with friends. Questions about mood included frequency of feeling hopeless and considering or attempting suicide.

The researchers didn’t examine circumstances surrounding individual suicides. Dr. Christine Moutier, chief medical officer at the American Foundation for Suicide Prevention, said the study provides weak evidence for a popular theory and that many factors influence teen suicide.

The study was published Tuesday in the journal Clinical Psychological Science.

Data highlighted in the study include:

Teens’ use of electronic devices including smartphones for at least five hours daily more than doubled, from 8 percent in 2009 to 19 percent in 2015. These teens were 70 percent more likely to have suicidal thoughts or actions than those who reported one hour of daily use.

In 2015, 36 percent of all teens reported feeling desperately sad or hopeless, or thinking about, planning or attempting suicide, up from 32 percent in 2009. For girls, the rates were higher — 45 percent in 2015 versus 40 percent in 2009.

In 2009, 58 percent of 12th-grade girls used social media every day or nearly every day; by 2015, 87 percent used social media every day or nearly every day. They were 14 percent more likely to be depressed than those who used social media less frequently.

“We need to stop thinking of smartphones as harmless,” said study author Jean Twenge, a psychology professor at San Diego State University who studies generational trends. “There’s a tendency to say, ‘Oh, teens are just communicating with their friends.’ Monitoring kids’ use of smartphones and social media is important, and so is setting reasonable limits, she said.

Dr. Victor Strasburger, a teen medicine specialist at the University of New Mexico, said the study only implies a connection between teen suicides, depression and social media. It shows the need for more research on new technology, Strasburger said.

He noted that skeptics who think social media is being unfairly criticized compare it with so-called vices of past generations: “When dime-store books came out, when comic books came out, when television came out, when rock and roll first started, people were saying, ‘This is the end of the world.'”

With its immediacy, anonymity, and potential for bullying, social media has a unique potential for causing real harm, he said.

“Parents don’t really get that,” Strasburger said.