The violence is thought to be linked to a battle for control of the jails after a gang leader’s killing.