The coroner has a superior right, if s/he chooses, to take temporary possession of a dead body in order to find out the cause of death. Learn more here. When the coroner has completed his/her investigation of the circumstances (this may involve an examination of the body) the body will be released to the personal representative of the person who has died.
A hospital has the right to detain the body of anyone who has died of a notifiable disease if it is deemed by a suitably qualified clinician that the body may be infectious.
If the person who died made a will, and the coroner does not wish to take possession of the body, an executor, whether a family member or not, has the immediate right to act as personal representative and take possession of the body. The executor has the right to delegate this to a family member, but the executor also has the right to overrule a family member.
If the person who died did not make a will or if the will did not appoint an executor/s, you can find out who the rightful personal representative/s is/are by consulting the Non-Contentious Probate Rules, rule 22. You do not need to apply for a letter of administration if the person who has died had little money and no property – in other words, an estate.
In the case of the death of an adopted child, adoptive parents have a better right to possession than natural parents, but natural parents have a better right than foster parents.
Note 1: if the person who died was not married to, or in a civil partnership with, his/her partner, the living partner has no automatic right to make funeral and/or disposal arrangements. If, however, the person who died made a will and appointed an unmarried partner as executor, s/he has full power to act as personal representative.
Note 2: It is often assumed that the term next-of-kin has the prior right to take charge. Next-of-kin is often used in a very unclear way to mean, for example, an emergency contact. When someone is alive, next-of-kin have certain rights, but when that person dies, unless the next-of-kin is named as an executor, it is the personal representative who takes charge.