Social media firms could be banned if they fail to remove harmful content, the health secretary has warned.
Speaking on the BBC’s Andrew Marr show, Matt Hancock said: “If we think they need to do things they are refusing to do, then we can and we must legislate.”
But he added: “It’s not where I’d like to end up.”
The minister earlier called on social media giants to “purge” material promoting self-harm and suicide in the wake of links to a teenager’s suicide.
Molly Russell, 14, took her own life in 2017 after viewing disturbing content about suicide on social media.
Speaking to the BBC, her father said he believed Instagram “helped kill my daughter”.
Facebook, which owns Instagram, said it was “deeply sorry”.
The internet giant said graphic content which sensationalises self-harm and suicide “has no place on our platform”.
Papyrus, a charity that works to prevent youth suicide, said it has been contacted by around 30 families in the past week who believe social media had a part to play in their children’s suicides.
“We’ve had a spike in calls to our UK helpline since the BBC first reported this six days ago, all saying the same thing,” said a spokeswoman for the charity.
Mr Hancock said he was “horrified” to learn of Molly’s death and feels “desperately concerned to ensure young people are protected”.
In a letter sent to social media companies, the minister “welcomed” steps already taken by firms but said “more action is urgently needed”.
He wrote: “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.”
He added that the government is developing a white paper addressing “online harms”, and said it will look at content on suicide and self-harm.
Mr Hancock explained: “Lots of parents feel powerless in the face of social media. But we are not powerless. Both Government and social media providers have a duty to act.
“I want to make the UK the safest place to be online for everyone – and ensure that no other family has to endure the torment that Molly’s parents have had to go through.”
Molly was found dead in her bedroom in November 2017 after showing “no obvious signs” of severe mental health issues.
Her family later found she had been viewing material on social media linked to anxiety, depression, self-harm and suicide.
Mr Russell told the BBC: “Some of that content is shocking in that it encourages self harm, it links self-harm to suicide and I have no doubt that Instagram helped kill my daughter.”