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.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…