Casablanca: Moroccan police have crushed an escape attempt by inmates at a juvenile detention centre in Casablanca, resulting in nine detainees being injured, the prison service said on Friday.

“The Ain Sebaa rehabilitation centre was the scene of rioting” by prisoners on Thursday night, the General Directorate of Prisons and Re-integration said.

Detainees at the centre in the northeast of Morocco’s biggest city set fire to beds in a bid to attract staff, attack them and try to escape, it said.

The prisoners tried and failed to break into a weapons store, but managed to get out of the main building and set alight a prison bus, it said. They attacked and lightly wounded several staff.

Police then intervened to put down the riot.

An AFP photographer on the scene saw fire and smoke coming from the centre, which was surrounded by security forces.

Videos posted online appeared to show a large explosion at the centre and a burning bus, with the sound of gunshots and police sirens.

Local news websites said witnesses had heard the sound of gunfire coming from the facility.

The prison service said nine detainees were hurt in the incident, although it was not clear whether from smoke inhalation or during clashes with the police.

The prison service said it would open an enquiry to determine who was behind the incident.

Moroccan prisons are chronically overcrowded, housing some 65,000 detainees in facilities with a capacity of just 30,000, according to the Ministry of Justice.