A high court judge has ordered hearings for an inquiry into claims of systemic abuse at an immigration removal centre be held in public and that 21 staff from the security firm G4S can be compelled to give evidence.

This is the first time that a public inquiry into conditions in immigration detention has been ordered.

The case was brought by two former immigration detainees known as MA and BB, who were featured in an undercover BBC Panorama programme about Brook House immigration removal centre (IRC) near Gatwick airport. Footage showed the first detainee being throttled by a member of G4S staff.

The programme, broadcast in September 2017, revealed a culture of chaos with officials mocking, abusing and assaulting detainees, prompting the security firm to order an independent review. Brook House’s then director, Ben Saunders, resigned soon after the broadcast.

Despite the revelations, the Home Office awarded G4S a contract to run Brook House for a further two years.

Of the 21 staff involved in the allegations 11 were dismissed or left the organisation after the BBC programme, says G4S. Three staff involved in the allegations later resigned. One was dismissed after subsequent similar behaviour.

The Home Office asked the prisons and probation ombudsman to investigate the issues raised by Panorama. However, this investigation is being conducted behind closed doors and the G4S officers involved are not required to give evidence if they prefer not to.

Lisa Giovannetti QC, representing the Home Office, argued during the case that it would be unduly time consuming and costly to hold a public inquiry into the issues raised and that it did not matter if some witnesses declined to attend – a situation that often arises but does not prevent a court reaching conclusions.

The judge in the case, Mrs Justice May, disagreed.

May said that while not all the hearings of the inquiry had to be held in public, some of them must be. Her judgment went beyond the specific concerns raised by Panorama to more systemic abuses in immigration detention, saying immigration detainees were a “uniquely vulnerable group of people”.

She added: “It is unacceptably degrading and dehumanising where there is repeated and apparently casual abuse on the part of staff employed by the state to supervise and look after such detainees.”

A public inquiry was required, the judge continued, because the “full extent of the discreditable behaviour has not been exposed to public view” and that having open hearings would be necessary “to maintain public confidence in the rule of law”.

She also raised concerns that neither Home Office staff based at Brook House, nor various inspectors including from HM Inspectorate of Prisons “noticed anything amiss”.

In her judgment, May noted “the egregious nature of the breaches, the multiplicity and regularity of the abusive events and the openness of the activity within the units. These were not isolated incidents of abuse … They were repeated events in front of others where the perpetrators were managers and trainers as well as ordinary officers.”

She said it was necessary to compel G4S staff to give evidence as there was an “overwhelming probability” that they would not do so voluntarily.

Lewis Kett, of Duncan Lewis Solicitors, representing MA, said: “Today’s judgment is hugely important. It ensures that the officers who instigated the abuse in Brook House will be compelled to explain their actions and how and why they felt able to openly do what they did.”

Former detainee BB said: “This case has forced me to relive some of the most painful times in my life. I was worried that the voices of the victims would never be heard and that the truth would never come out. But now we will have a proper inquiry. People need to know the truth about immigration detention.”

Joanna Thomson, of Deighton Pierce Glynn, representing BB, said: “This important judgment should now lead to an investigation that will uncover the truth so that there are no further abuse scandals in the UK’s immigration removal centres.”

A Home Office spokesperson said: “We will consider this ruling carefully. It would be inappropriate to comment further while legal proceedings are ongoing.”

Callum Tulley, who went undercover for Panorama, said: “In the two and half years I spent inside Brook House … I bore witness to the repeated mistreatment of some of the most vulnerable people in our society. Some detainees were driven to drug use, self-harm and suicide attempts, while others were victims of physical and racial abuse from staff.

He added: “It’s been hugely frustrating to be told the mistreatment we worked so hard to expose has not yet been adequately investigated, and for those involved, justice has not been done. So it’s encouraging that with a full public inquiry likely to take place, those responsible for the abuse may be held accountabe, and detainees in this country may face a safer, stronger system in the future.”