More than 40 people were killed in a fire in an overcrowded prison in Indonesia on Wednesday.

41 prisoners died, eight were seriously injured and 31 suffered minor injuries, Justice Minister Yasonna Laoly announced.

The fire had broken out in the early hours of the morning when most of the inmates in Tangerang prison outside the capital Jakarta were still asleep.

The television showed pictures of the burning prison block and thick clouds of smoke over the building.

The fire brigade was able to extinguish the fire, which was largely confined to one block of the detention center, during the night and bring injured inmates to the hospital.

Prisoners sentenced mainly for drug offenses were held in the block.

"The fire spread quickly and there was no time to open some of the cells," said Justice Minister Laoly.

The dead were then found in these cells.

The minister added that DNA tests are likely to be necessary to identify them.

According to him, two foreigners, a Portuguese and a South African, were among the dead.

Not modernized for more than 40 years

The authorities started investigations into the cause of the fire, but already had a suspicion: "According to initial findings, there is a suspicion that the fire was triggered by a short circuit," said Jakarta Police Chief Fadil Imran.

Justice Minister Laoly said the prison's electrical system had not been upgraded in more than 40 years.

According to the prison authorities, there were more than 2,000 inmates in the prison - it is designed for 600 inmates.

The prison block that caught on fire was also far too full.

As a spokeswoman for the authorities told the station Metro TV, there were 120 prisoners in Block C, which was designed for 40 prisoners.

Many prisons in Indonesia are overcrowded and in need of rehabilitation.

There are repeated prisoner riots and mass outbreaks.