Five inmates who rioted at Victoria’s maximum security facility for remand prisoners and caused more than $300,000 damage have appeared in a Melbourne court under heavy security.

The County Court on Thursday heard that the Melbourne Remand Centre was locked down for days after the five young men scaled and bent a wire fence to enter a forbidden ‘‘sterile zone’’ that surrounded the prison.

Prosecutor Lynne Featonby told the court the men injured three prison officers with thrown rocks and destroyed CCTV cameras, intercom panels and windows before they were subdued after more than two hours.

Ms Featonby said in her opening the men were ultimately ‘‘sandwiched’’ between two teams of officers wearing full riot gear and deploying chemical agents after the incident on August 12, 2012.

Patrick Meizys, 19, Sam Liszczak, 20, William Smith, 20, Joseph Haebich, 22, and Andrew Foster, 20, each pleaded guilty to a charge of riot, criminal damage and to three charges of recklessly causing injury.

When they entered the dock they were flanked by six burly prison officers while others sat in the body of the courtroom.

Solicitor Melinda Walker, for Meizys and Liszack, told Judge Frank Gucciardo her clients had behaved stupidly, but questioned the appropriateness of their strict custody regime at their age since the incident that included virtual solitary confinement.

In response, Judge Gucciardo said while he understood the seriousness of the offences, he contrasted that with the money and effort that had gone into keeping the men under such ‘‘management’’ conditions.

He commented that the resources had been expanded for ‘‘this type of resolution so we can all feel safe’’, but that in the long term ‘‘we end up with’’ five long-term criminals.

The case continues.