According to officials, two undertrials - Deepak Kumar, an accused in a robbery case and another person named Mohit - had been brought from the Ambala Jail to the General Hospital in Panchkula for treatment.
However, three miscreants who came to the hospital, used chilly powder on the staff and policemen escorting the undertrials, opened fire and freed Deepak Kumar from custody, the police said.
The second undertrial Mohit was still in custody, they added.
In the ensuing melee, five people, including three nurses, fell unconscious and are being treated at the hospital, the police said.
One of the constables was manhandled during the scuffle, the police added.