Gunmen stormed a prison in southwestern Mexico on Friday in an attack that left five of the assailants and four inmates dead, officials said.