High Court judges are to rule on whether a coroner's decision to adopt a "cab rank" queuing system for burials is unlawful.
Religious groups brought a legal challenge against a policy established by Mary Hassell, the senior coroner for inner north London, which means deaths in her jurisdiction are dealt with on a first-come, first-served basis.
The policy stipulates that no death will be prioritised based on the religion of the deceased or their family by either the coroner or her officers.
But lawyers argued at a hearing last month that it ignores "deeply held beliefs" of certain religious communities which require their dead to be buried as soon as possible.
They said Ms Hassell's stance is unlawful and breaches the Human Rights Act and the Equality Act.
The court previously heard Ms Hassell's jurisdiction covers the boroughs of Camden, Islington, Hackney and Tower Hamlets, which between them have "sizeable" Jewish and Muslim minority populations.
Sam Grodzinski QC told the court there was evidence from Jewish and Muslim leaders that the policy has caused "widespread distress" among faith communities.
The barrister, representing the Adath Yisroel Burial Society, told the court his case was not that religious groups must come first, but that religious belief must be "conscientiously taken into account" by a coroner.
He added: "If the coroner's officer knows that the family has a genuine religious need to hold the funeral of their loved one either later that day or the next day, this religious need cannot lawfully be excluded from the defendant's consideration.
"And yet, the effect of the policy is that the Jewish or Muslim family must simply take their place in the cab rank queue - regardless of whether others require any urgent decision from the coroner."
Since first outlining the policy, Ms Hassell has said it is "flexible" and does take into account the wishes of families.
Lawyers representing the Chief Coroner of England and Wales, Judge Mark Lucraft QC, said the policy set out by Ms Hassell was "over-rigid" and "not lawful".
They said there was "no criticism" of Ms Hassell intended, as her decision may have been motivated by a "genuine intention" to be fair to everyone in her area.
However, they argued it was wrong to "rule out" speeding up the process in relation to deaths where family members had asked for a loved one's body to be released quickly by reason of their faith.