The court of joint district Sessions Judge D B Patel also imposed a fine of Rs 88,000 on the convicts.
There were 39 accused in the case, of which four died during the course of trial while cases of two others are pending with the juvenile court.
According to details, two persons were killed in gun firing during a communal clash at Viramgam, some 70 km from Ahmedabad city, over a cricket match between locals in November 2003.
During the play, the ball went inside a temple, which irked some people. This was followed by a brawl between them, resulting in a major clash. Two persons died in the incident while 26 others were injured.