All of the dead, including two foreigners, were inmates, with guards unable to unlock doors in time.