Social media companies are facing renewed demands from the government to protect children from harmful online content, amid growing concerns over suicide and self-harm among teenagers.

Matt Hancock, the health secretary, has warned companies including Facebook, Google and Twitter that he will use the law to force them to act should they fail to remove inappropriate content. He warns that the benefits of new technology could be “lost because of reasonable concerns about its risks”.

He writes: “It is appalling how easy it still is to access this content online and I am in no doubt about the harm this material can cause, especially for young people. It is time for internet and social media providers to step up and purge this content once and for all.”

Hancock said he had issued the demand after the case of Molly Russell, 14, who took her own life in 2017. Her Instagram account was found to contain distressing material about depression and suicide.

Her father, Ian, said he believed social media was partly to blame for his daughter’s death. Facebook, which owns Instagram, said it was “deeply sorry” over the case. Instagram has said it “does not allow content that promotes or glorifies self-harm or suicide and will remove content of this kind”.

Hancock said that protecting teenagers from graphic material online had to be part of efforts to tackle mental health issues among the young. “As you know, I have for some time been very concerned that we act now to stop children and young people being exposed to harmful content online,” he writes. “As health secretary, I am particularly concerned about content that leads to self-harm and promotes suicide.

“Suicide is now the leading cause of death for young people under 20. Levels of self-harm are rising among teenage girls in particular. Like any parent, I was horrified this week to learn of 14-year-old Molly Russell, who tragically took her own life. Molly was just two years older than my own daughter is now, and I feel desperately concerned to ensure young people are protected.

“I was inspired by the bravery of Molly’s father, who spoke out about the role of social media in this tragedy – and moved by the sense that there is much more we all need to do to stop a tragedy like this from happening again.”

Hancock’s letter comes ahead of a government white paper on the risks of online content, which will include issues around suicide and self-harm. “I want to work with internet and social media providers to ensure the action is as effective as possible,” he continues. “However, let me be clear that we will introduce new legislation where needed.

“Research shows that people who are feeling suicidal use the internet to search for suicide methods. Websites provide graphic details and information on how to take your own life. This cannot be right. Where this content breaches the policies of internet and social media providers it must be removed.”

In the UK, Samaritans can be contacted on 116 123 or email jo@samaritans.org. In the US, the National Suicide Prevention Lifeline is 1-800-273-8255. In Australia, the crisis support service Lifeline is 13 11 14. Other international suicide helplines can be found at www.befrienders.org.