The blast occurred in the basement of the office at Takhta Band Road in Swat, located about 160 km from Islamabad.
Officials were quoted by the media as saying that five persons were killed instantly.
More than 40 injured people were taken to nearby hospitals, and the officials said five of them were in a serious condition.
State-run Radio Pakistan reported the blast was caused by a gas cylinder though private TV news channels described the incident as a bombing.
The Swat Valley was a stronghold of the local Taliban till the army conducted an operation to flush out militants in early 2009.
Most of the top Taliban commanders of the region escaped to Afghanistan.