Explosives were attached to the school building in Khyber tribal region, which detonated late Sunday night, they said.
No one was hurt as the school was closed at the time of the blast.
No group claimed responsibility and the officials blamed the militants for the attack. Taliban militants have claimed responsibility for attacks on schools in the past.
Officials said that boundary wall and three rooms of the schools were destroyed.