Fourteen inmates were killed and 35 others injured in a fire at a prison in the northern Mexican state of Nuevo Leon, authorities said Friday.

The blaze began just before 4:00 a.m. in the psychiatric wing of the medium-security prison in Apodaca, a city of 400,000 near Monterrey, the state capital.

The fire, which appears to have been caused by an electrical short circuit, caused the wing's roof to collapse, fire rescue said.

Guards tried to control the flames, but quickly realized the task was beyond them and decided to call in firefighters, who managed to put out the fire within about 20 minutes.

The injured inmates, most of them suffering from smoke inhalation, were moved to another part of the prison.

State government spokesman Jorge Domene told the media that due to overcrowding, prison authorities had been using the psychiatric wing as an inmate dormitory.

Fifty-seven inmates were inside the wing at the time of the fire, he said.

All of the inmates killed in the blaze were being held pending trial for federal offenses such as drug trafficking and racketeering, Domene said.

As police and army troops stood guard outside the prison in Apodaca, inmates' families gathered to find out if their loved ones were among the casualties.