Suspected militants blew up a school for girls in a former stronghold of the Pakistani Taliban in the country's volatile northwest, badly damaging the structure but no one was harmed in the overnight attack, a local police official said Thursday.

The attack happened Wednesday night on the only school for girls in Shawa, a town in the North Waziristan district in the Khyber Pakhtunkhwa province bordering Afghanistan, local police chief Amjad Wazir said.

He said the attackers used an explosive device to destroy the private Aafia Islamic Girls Model School, where 150 girls studied. Wazir said the school guard was beaten up by the insurgents, who then fled the scene.

PAKISTANI FORCES KILL 6 MILITANTS IN VOLATILE AFGHAN BORDER REGION

There was no immediate claim for the attack, but suspicion was likely to fall on Islamic militants who have often targeted girls' schools in the province in recent years as they believed women should not be educated.

Pakistani Flag

A large Pakistani flag is draped over the side of a building, Lahore, Pakistan, August 12, 2022. (ARIF ALI/AFP via Getty Images)

On Thursday, the United Nations Children’s Fund, UNICEF, strongly condemned the attack, calling it a "despicable and cowardly act that could jeopardize the future of many young and talented girls."

In a statement, Abdullah Fadil, the UNICEF representative in Pakistan, said the "destruction of a girls’ school in a remote and underserved area is a heinous crime detrimental to national progress."

He pointed to a statement by Prime Minister Shehbaz Sharif on Wednesday, declaring an education emergency and pledging to work towards enrolling 26 million out-of-school children.

Pakistan witnessed multiple attacks on girls' schools until 2019 especially in the northwestern Swat Valley and elsewhere in the northwest where Pakistani Taliban for years controlled the former tribal regions. In 2012, the insurgents attacked Malala Yousafzai, a teenaged student and advocate for the education of girls who went on to win the Nobel Peace Prize.

CLICK HERE TO GET THE FOX NEWS APP

The Pakistani Taliban, who are known as Tehreek-e-Taliban Pakistan or TTP, were evicted from Swat and other regions in recent years. TTP is a separate group but an ally of the Afghan Taliban, who seized power in Afghanistan in 2021.