Authorities on Thursday said that the fight between rival gangs of inmates in two prisons in Ecuador has killed at least 18 people and injured dozens.