The unidentified terrorists planted the bomb at the main gate of government primary school in Babu Tang area of Hangu district in Khyber Pakhtunkhwa province. The school was evacuated after a teacher informed the police about the bomb, Geo News reported.
Later, the Bomb Disposal Squad defused the 4 kg bomb and the school resumed its classes.
Militants have often targeted schools in Pakistan's volatile tribal areas.
On December 16, Taliban gunmen stormed into an army-run school in Khyber Pakhtunkhwa province's capital Peshawar and killed 150 people, most of them children. It was the most horrific assault in Pakistan's history.