At least 11 soldiers were killed in a suicide attack near a military camp in Swat, a valley in north-western Pakistan and hometown of noble laureate Malala Yosuafzai.
Inter Service Public Relations (ISPR), the Pakistani army's media wing, said in a statement on Saturday that another 13 soldiers were wounded. The injured have been moved to a military hospital for treatment.
"The suicide attacker blew himself up at a check post near an army unit headquarter in Kabal area of the valley," Karman Khan, a spokesperson for the police, told dpa.
Tehreek-e-Taliban (TTP) claimed responsibility for the attack on the army camp in an email sent to media.
Prime Minister Shahid Khaqan Abbasi condemned the attack.
"The coward terrorist enemy is no match for our valiant sons of the soil," Abbasi said. "No cowardly attack an deter us in pursuing our struggle against the menace of terrorism to its logical conclusion."
The valley had fallen to Taliban before the military launched a series of military operations in 2007 and helped peace return to the area. In 2009, Taliban were pushed across the border into Afghanistan, where Pakistan alleges they are sheltered.
In 2012, Taliban gunmen shot and severely injured Malala Yousafzai, who later become the youngest laureate of the Nobel Peace Prize for campaigning for girls' education in the Swat valley.
Violence in Pakistan has declined in recent years following a series of military offensives along the northwestern border with Afghanistan, but militant groups are still able to carry out bloody attacks.
There have been a number of deadly assaults in recent months in the northwest as well as in the southwestern Balochistan province.
The Swat Valley was under the de facto control of the Pakistani Taliban in 2007-2009.
The area has seen sporadic militant attacks since, including assassinations of local leaders who cooperate with the government.