BOGOTA, Colombia (AP) - A fire at a prison in southwestern Colombia has killed at least 51 people and injured a dozen more, prison authorities reported Tuesday.

The director of the national prison system, Tito Castellanos, told Radio Caracol that it's not clear if all of the dead were prisoners. He initially said 49 had died, but the Justice Ministry later raised the toll to 51.

He said the fire broke out during what appeared to be an attempted riot early Tuesday at the medium security prison in the city of Tulua.

He said inmates had set mattresses on fire without considering the consequences.

Justice Minister Wilson Ruiz added that more than 20 inmates were being treated for injuries in hospital, and said that two prison guards sustained minor injuries.

President Ivan Duque expressed condolences to the families of those who died and said he had ordered investigations into the cause.