Teenagers who spend time cooped up in their bedrooms may be more prone to feeling threatened, research suggests.

A new study found that people in their late teens experience an increased sensitivity to threats after just a few hours left in a room on their own, and this effect endures even if they are interacting with others online.

The findings might shed light on the link between loneliness and mental health conditions such as anxiety disorders, which are on the rise in young people, experts suggest.

They say their experiment – which saw 40 young people aged 16-19 undergo testing before and after several hours alone – both with and without their smartphones, is the first to find an increased threat response triggered by isolation in humans.

Emily Towner, study lead author from the University of Cambridge’s Department of Psychology, said: “We detected signs of heightened threat vigilance after a few hours of isolation, even when the adolescents had been connected through smartphones and social media.”

She added: “This alertness to perceived threats might be the same mechanism that leads to the excessive worry and inability to feel safe which characterises anxiety.

“It makes evolutionary sense that being alone increases our vigilance to potential threats.

“These threat response mechanisms undergo a lot of changes in adolescence, a stage of life marked by increasing independence and social sensitivity.

“Our experiment suggests that periods of isolation in adolescents might increase their vulnerability to the development of anxiety, even when they are connected virtually.”

In the study, researchers set out to induce loneliness in teenagers and study the effects through a series of tests, including electrodes that measure sweat.

One of the tests was a Pavlovian threat test, in which the teenagers were shown a series of shapes on a screen, one of which was paired with a harsh noise played through headphones, so the shape became associated with a feeling of apprehension.

According to the findings, periods of isolation, including those in which the teenagers could use their phones, led to an increased threat response – the sensing of and reacting to potential dangers.

This alertness can cause people to feel anxious and uneasy.

On average across the study, threat responses were 70% higher after the isolation sessions, regardless of whether participants had been interacting digitally.

The scientists say this isolation and loneliness might lead to something called excessive threat vigilance, which could negatively impact adolescent mental health over time.

The authors suggest it could also contribute to the persistent and exaggerated fear responses typical of anxiety disorders on the rise among young people around the world.

Dr Livia Tomova, co-senior author and lecturer in psychology at Cardiff University, who conducted the work while at Cambridge, said: “Loneliness among adolescents around the world has nearly doubled in recent years.

“The need for social interaction is especially intense during adolescence, but it is not clear whether online socialising can fulfil this need.

“This study has shown that digital interactions might not mitigate some of the deep-rooted effects that isolation appears to have on teenagers.”

The findings are published in the journal Royal Society Open Science.