Germany's Federal Court of Justice has ruled the parents of a deceased girl can access her Facebook account, saying they had inherited the right to the social media data just like to her diary or letters.

Key points: Parents are trying to determine if it was an accident or if their daughter took her own life

Parents are trying to determine if it was an accident or if their daughter took her own life Facebook argued opening the account would compromise the privacy of the teenager's contacts

Facebook argued opening the account would compromise the privacy of the teenager's contacts Access has previously already been granted by one court before being denied by another

Thursday's ruling overturned a decision by a lower court in Berlin, which had ruled that German privacy laws outweighed parental rights.

The parents sued for access to their daughter's Facebook account after the 15-year-old died after being hit by a subway train in Berlin in 2012.

They are trying to determine if it was an accident or if she took her own life.

The German news agency dpa reported Facebook had not wanted to let the parents access their dead daughter's account, citing privacy reasons.

What happens to social media accounts after a user's death is still very much a grey area, with access to the teenager's Facebook account already having been previously granted by one court before being denied by another.

Last year, the BBC reported a first court in Berlin had rule in favour of the family, saying a social media account can be inherited just as letters are.

The parents sought access to her chat messages and posts in order to find out whether she had been bullied.

But an appeals court ruled in favour of Facebook, saying that a contract existed between the girl and social media company and it ended after she died.

Facebook argued that opening the account would compromise the privacy of the teenager's contacts.

Facebook had turned the girl's profile into a so-called "memorial page", where access to the user data is not possible although the content still exists on Facebook servers.

ABC/wires