The military offensive took place a few days after the Taliban killed dozens of people, mainly children, in a school attack in Peshawar to discourage military activity Reuters

At least 32 insurgents have been killed by the Pakistani army in an ambush near the Afghan border and another 27 in other clashes, officials have said.

The announcement came a few days after the Pakistani Taliban carried out a massacre in a school in Peshawar, killing at least 148 people, of whom 132 were children.

It is believed the attack, the deadliest carried out by the militants, aimed to discourage military activity in the area and was also "in revenge" after the military allegedly killed civilians in remote areas.

"Security forces ambushed [the] moving group ... Fleeing terrorists left behind bodies of their accomplices," Reuters quoted a military statement as saying.

Following the school attack, the Pakistani government lifted a moratorium on the death penalty and announced it would sentence to death some terrorists involved in the massacre.

"It was decided that this moratorium should be lifted. The Prime Minister [Nawaz Sharif] approved," government spokesman Mohiuddin Wani said.