El Salvador’s supreme court declared the country’s street gangs and those who finance them terrorist groups on Monday.

The court said the well-known Marasalvatrucha or MS-13 gang and any other gang that attempts to claim powers that belong to the state would be considered terrorists. It defined terrorism as the organized and systematic exercise of violence.

The court’s declaration came as a denial to four attempts to declare the country’s Special Law Against Terrorist Acts unconstitutional. The court found that telephone wiretaps and the freezing of funds belonging to third parties tied to terrorist groups are constitutional, among other issues.

The court spoke on the same day that El Salvador’s attorney general said an 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.

The gangs have intensified their attacks against authorities and public transportation in recent weeks in an attempt to pressure the government into negotiations. But the government has refused to bow to the gangs and has kept their leaders in maximum security prisons.