But in a judgment released on Friday Lord Justice Singh and Mr Justice Whipple said her understanding of the law was “misguided” and the guidance was incorrect.
“What on its face looks like a general policy which applies to everyone equally may in fact have an unequal impact on a minority.
“In other words, to treat everyone in the same way is not necessarily to treat them equally.
“Uniformity is not the same thing as equality,” they said.
They ruled that the policy was unlawful and said she should introduce a new one.
Religious groups welcomed the ruling.
Rabbi Asher Gratt, speaking on behalf of the Adath Yisroel Burial Society, a charity which arranges burials for Orthodox Jewish people in north London, and which originally brought the case, said: “This legal victory will bring immense relief for grieving families to bury their loved ones with respect and dignity, preventing further unnecessary anguish at the darkest moment of their lives.”
Marie van der Zyl, president of the Board of Deputies of British Jews, said Ms Hassell must “consider her position”.
“She has previously said that she does not believe that using her discretion to order cases, which she needs to do to uphold the religious freedom of the diverse communities she is meant to serve, is ‘fair’.
“If she cannot carry out this basic function of her role, she must vacate her position.”
A statement issued by Ms Hassell’s office said that she would implement a new policy following a consultation process.
The Chief Coroner is also expected to issue new guidance reflecting the ruling.
“In future, instead of considering no family for prioritisation, the Senior Coroner will consider every family for prioritisation.
“In deciding the order of priority, she will take into account all relevant considerations, including the special needs of each individual family,” the statement said.