A fire killed 41 inmates in an overcrowded prison block in Indonesia’s Banten province on Wednesday, a government minister said, injuring scores more in a blaze that police said may have been caused by an electrical fault.

The fire, the country’s most deadly since 47 perished in a firework factory disaster in 2017, broke out at 1.45 a.m. local time in a Tangerang Prison block, said Indonesian law and human rights minister Yasonna Laoly, after visiting the scene.

“We’re working together with relevant authorities to look into the causes of the fire and of course formulating prevention strategies so that severe catastrophes like this won’t happen again,” the minister said in a statement.

The minister said two of the dead were foreign nationals, one each from South Africa and Portugal, and confirmed the prison was operating at overcapacity when the fire broke out.

Cells were locked at the time, the minister said, but with the fire raging uncontrollably, “some rooms couldn’t be opened.”

The penitentiary department’s website showed the jail had just over 2,000 inmates, more than three times as many prisoners than it was designed to hold.

The block where the fire broke out had a maximum capacity of 40 prisoners but housed 120, penitentiary directorate general spokesperson Rika Aprianti said.

Prisons in Indonesia are notoriously overcrowded, with experts saying the phenomenon is partly due to the emphasis on incarceration rather than rehabilitation of those convicted of drug-related offences under the country’s strict narcotics laws.