El Salvador's attorney general says the order to kill gang members in a prison over the weekend came from inside another prison.

Luis Martinez said Monday that the slaughter of 14 gang members inside the Quezaltepeque prison in western El Salvador came from the San Francisco Gotera prison in the eastern part of the country.

The gang members were all strangled or stabbed to death on Saturday. They were members of the 18th Street Revolutionaries gang. Authorities said the killings were part of an internal "purge."

Martinez said authorities had information that a mass killing in a prison was coming, but they did not know where or when.

The murders were among 45 registered in the country Saturday and another 31 occurred on Sunday.