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.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.