Authorities in El Salvador say they have transferred 31 gang members, including two bosses from the hyper-violent Mara Salvatrucha gang, to the country's maximum security prison.

Prisons director Rodil Hernandez said Thursday in San Salvador that the gang members were moved from regular prisons to the maximum security lockup where they will be completely isolated from the outside world.

He said investigations indicated these gang members, from both MS 13 and Barrio 18 gangs, had ties to some recent attacks on state institutions. He said the transfers were the result of classifying the most dangerous prisoners.

So far this year, gang members have been blamed for killing 20 police officers, two soldiers, six prison guards and a prosecutor.