All of them were members of El Salvador’s notorious Barrio 18 gang.
The bodies were discovered in two separate locations during a routine inspection of the prison in Quezaltepeque, officials said.
The deaths are believed to be the result of an internal feud.
The prison authorities and police have launched an investigation.
El Salvador has one of the highest murder rates in the world, largely as a result of bitter fighting between rival gangs.
On August 19, police said there were at least 125 murders in just three days in the country.
The Directorate General of Prisons said on Twitter that the latest violence was “presumed to be an act of purification among gang members”.
Last month, Barrio 18 ordered a bus strike and seven bus drivers were killed when they defied the gang.
The group was demanding to be included in a commission examining ways of stemming urban violence – which they are largely responsible for.
El Salvador President Sanchez Ceren has focused on tackling crime since he took office but the country has faced a sharp increase in violence since 2014.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…