Additional Sessions Court judge T K Unnimol said the sentences will run concurrently.
The judge also awarded life imprisonment to another accused and three years to another person.
The court found all the 13 accused guilty of murdering CPI(M) worker Vishnu at Kaithamukku in the city on April 1, 2008.
According to the prosecution, the accused had attacked Vishnu with swords, iron rods and other weapons over political rivalry.
There were 16 accused in the case, of which one was acquitted, one died and another is absconding.