Militants attacked an isolated army checkpoint in Pakistan's restive northwest, with at least 35 people killed in the initial assault, subsequent crossfire and a rocket attack on a house, officials said.
The Pakistan Taliban claimed responsibility, saying the attack was in response to a US drone strike in neighbouring North Waziristan last month in which two commanders were killed.
The Pakistani military and pro-government militias have since 2009 regained territory from the Pakistan Taliban, who once controlled land a few hours' drive from the capital of Islamabad.
The militants attacked the post at Lakki Marwat early on Saturday.
A security official said 12 militants and 13 soldiers were killed in the clash. Two bodies had suicide bomb belts on them.
''Cross-firing between militants and security officials continued for four hours,'' one source said.
The militants also targeted a house next to the camp with rockets, killing 10 members of one family, including three children, the official said.
''Pakistan has been co-operating with the US in its drone strikes that killed our two senior commanders, Faisal Khan and Toofani, and the attack on military camp was the revenge of their killing,'' the Taliban spokesman said.
He said four suicide bombers attacked the camp and blew themselves up. He said more than a dozen soldiers were killed.