Initial reports said three troops died in the attack but later the army said eight soldiers who were critically wounded died of their wounds.
The death toll could rise, the official said, in the attack as civilians watched the match.
The bomb exploded on Saturday evening when the soldiers were playing volleyball after duty in the unit's sports area. The injured were later shifted by rescue officials to a hospital in Saidu Sharif area of Swat, according to government sources.
Tehreek-e-Taliban - bettern known as the Pakistani Taliban - claimed the attack and warned that more attacks will follow. The Pakistani military wrested the region from the Taliban in 2009 and has maintained a heavy presence.
The prime minister said that no cowardly attack can deter Pakistan in pursuing struggle against the menace of terrorism to its logical conclusion. "We will continue our fight till the last trace is rooted out", the prime minister said in a statement.
Daesh ruled the picturesque Swat Valley from 2007 until a massive military operation routed them from the area in 2009.
They were defeated two years later after a series of military operations that have since been hailed as the blueprint for the Pakistani military's continuing battle against the group.