Police had arrested the five suspects in the case who were brought before the court early this week amid tight security.
The convicts were also fined Rs 2 lakh each.
Amateur video footage had surfaced in 2012 in which two men belonging to Sunni Khel tribe were seen dancing while five women belonging to Saram Khel tribe were shown clapping at a village in the northern Kohistan district.
The incident left 15 others including six women injured.
Also Read
Bari demanded that the Chief Justice reopen the case.
The Supreme Court had taken up the case following reports that the five girls were killed for dancing at a marriage ceremony.