Parents of children who may have died due to online harm have won their battle for tougher powers to investigate tech companies.
Coroners will be able to demand data from firms when holding an inquest into the circumstances of a child's death.
The announcement comes after the OceanNewsUK revealed campaigners were accusing ministers of "watering down" initial promises about the new powers.
Bereaved families welcomed the government's decision to change course.
They said it would mean other parents would not face the "agonising experience of being stonewalled by tech companies".
Campaigners have been pushing for new powers to get information from companies after the difficulties the coroner faced dealing with social media firms in the case of Molly Russell.
The 14-year-old ended her life in November 2017 after viewing suicide and self-harm content online.
The coroner concluded that the schoolgirl died while suffering from the "negative effects of online content".
The government had initially announced plans in June to give coroners new powers to access information held by tech companies, where there is a reasonable suspicion that social media, gaming or other parts of the online world was relevant to their deaths.
But it emerged in December that under the Data Bill, currently being debated in parliament, this provision was being narrowed to only apply to children who have taken their own lives, and not children who have died in other ways with social media potentially involved.
This change was opposed by the Bereaved Families for Online Safety, a campaign group which includes Lorin LaFave, whose 14-year-old son Breck Bednar was murdered in 2014 by a boy he had met through online gaming; and Stuart Stephens, whose 13-year-old son Olly Stephens was murdered by two boys in 2021, with social media at the heart of the case.
After a series of meetings with the campaigners, the government has changed course.
Science Secretary Michelle Donelan told the OceanNewsUK: "This important change will give bereaved parents access to critical digital information at a tragic time.
"Although nothing can take away the pain endured by the families, I hope this amendment goes some way to give more answers to anyone unfortunate enough to find themselves in similar heart-breaking situations."
A source close to Ms Donelan said: "She hopes that it can give the families some comfort to know that their campaigning has made a real difference."
In a statement, Bereaved Families for Online Safety said: "We are pleased the government will honour its promise to us.
"As a group of families with our own individual stories, we are reassured that future bereaved families will not have to share in our agonising experience of being stonewalled by tech companies."
Baroness Kidron, a crossbench peer who campaigns for more protections for young people online, said she was "delighted" the government had changed course.
"The transparency this measure will bring forward will lift a veil on the role of tech companies in cases where children die. It will reveal information that, however painful, is necessary for parents to come to terms with the death of their children."