A court in El Salvador on Wednesday sentenced seven members of a notorious criminal gang to 390 years in prison each for their part in a March 2016 massacre that shocked the crime-ravaged Central American country.

The men, part of the "Barrio 18 Revolutionaries" gang, received a 35-year prison sentence for each of the 11 victims killed in the massacre, plus five years for their affiliations with illegal gangs, the attorney general's office said on Twitter. El Salvador's maximum sentence is 35 years.

Authorities have said the gang members early last year kidnapped and killed three day labourers and eight workers of an electric company in the quiet town of San Juan Opico, some 27 miles northeast of the capital San Salvador.