A court in Germany has ruled that the parents of a dead teenage girl have no right to access their daughter's Facebook account.
The 15-year-old was killed by a train in 2012 and her parents were trying to establish if she had committed suicide.
They had sought access to her chat messages and posts in order to find out whether she had been bullied.
But Facebook argued that opening up the account would compromise the privacy of the teenager's contacts.
A first court in Berlin had ruled in favour of the family, saying that the contents of the girl's account could be seen as similar to letters and diaries, which "can be inherited regardless of their content".
But an appeals court has now ruled in favour of Facebook, saying that a contract existed between the girl and the social media company and that it ended with her death.
The parents may yet launch a further appeal against the verdict.
Facebook has recently faced increased scrutiny in Germany, especially over its handling of hate speech and fake news on the platform.
The company earlier this year announced the introduction of new tools in Germany to combat fabricated stories.
Meanwhile, German officials last month approved plans to levy heavy fines on social media firms if they fail to remove inappropriate comments and content quickly.