A court order permitting 16 police officers to be screened from public view during an inquest into the death of a black man who had been restrained at Huddersfield police station has been overturned by a judge.

It is the latest dispute over anonymity involving officers at coroners’ courts. Human rights campaigners have warned of a growing trend for forces and the Police Federation to try to shield identities and restrict open justice.

Andrew Hall, 43, died on 13 September 2016 at Huddersfield Royal Infirmary (HRI). He had collapsed at home after taking alcohol and prescription drugs. Paramedics took him to the accident and emergency department where he was revived and he allegedly slapped a nurse.

Police were called and Hall was arrested. He was removed and put in a police cell where his condition was monitored. At one stage, as he was being returned to a cell, there was a struggle.

“Officers forcibly moved him and then restrained him and it appears that during this ... one [or] more of the officers struck Andrew Hall multiple times,” the high court judgment records. “He may have struck back.”

Paramedics were called and he was returned to hospital wearing handcuffs and leg restraints. Hall was sedated but his condition deteriorated and he died at the HRI later that night.

The deaths of black men in police custody or shortly after being restrained have been highly controversial and have led to protests as well as protracted legal battles to obtain the truth about precisely what occurred.

Police anonymity orders are more common in cases involving fatal shootings. The charity Inquest, which represents relatives at coroners’ courts, says there has been an increase in the number of anonymity applications made and granted to police officers where the death involved police restraint.

Recent inquests where anonymity has been granted to officers include the cases of Rashan Charles, a young black man who died after he was restrained by Metropolitan police officers on 22 July 2017, and Edson Da Costa, who died six days after becoming unconscious following restraint by Met officers, also in 2017.

At a police misconduct hearing into a car pursuit that led to the death of Henry Hicks, a London carpenter, in December 2014, four officers were granted anonymity.

Inquest says it is aware of two current cases involving the deaths of black men in custody or following restraint by police in which applications are being made for anonymity.

For the Andrew Hall inquest, West Yorkshire police and the Police Federation applied for anonymity for officers and for them to give evidence from behind screens. The coroner granted permission.

Lawyers for the family, represented by Leslie Thomas QC, went to the high court in Leeds to challenge the screening order.

Delivering judgment, Mrs Justice Jefford said the coroner had misdirected himself because he had failed to take into consideration sufficiently the interests of open justice in a controversial case that involved the death of a black man following police restraint.

Anonymity orders for the police involved will remain in place, and Jefford ruled that two officers, identified only as C and N, could still give evidence from behind screens.

“Screening of a witness who cannot, therefore, be seen by the general public and/or the press is an incursion [on the principle of open justice],” the judge said. “Being able to see a witness give evidence is an important factor in assessing the witness’s demeanour and, if it is in issue, credibility.”

Alice Stevens, a solicitor who represents the Hall family, said: “Recent years have shown a rising trend in police officers seeking anonymity and screening at inquests in which their actions are called into question. This judgment rightly highlights the fact that open justice in inquests involving contact by state bodies should not be undervalued and that screening may undervalue public confidence and should not be granted without careful consideration.”

Deborah Coles, director of Inquest, said: “We repeatedly see defensive and combative tactics by police lawyers in the growing number of anonymity requests at inquests. This is about justice being done and being seen to be done. Anonymity goes against the spirit of an open and transparent investigation and hinders scrutiny of public officials. This judgment recognises the significant public interest in deaths of black men in custody.”

The Police Federation is considering an appeal against the decision.