Militants from Afghanistan crossed into Pakistan and killed 13 Pakistani troops, beheading seven of them.
Pakistan's military said more than 100 militants crossed into Pakistan from Afghanistan and killed the Pakistani troops, proving tensions continue to grow along the countries' borders.
The newly elected Prime Minister Raja Pervaiz Ashraf said he would protest against the latest and particularly brutal attack to Afghan president Hamid Karzai.
"We have strongly protested and I will, too, God willing, talk about this to Karzai," AFP quoted Ashraf as saying in Karachi.
Military officials said the incursion was in the north-western Pakistan's Upper Dir region on 24 June.
Six Pakistani troops were killed in initial clashes and 11 eleven Pakistani officers also went missing following the confrontation, seven beheaded bodies were later found, four are still missing, the military added.
The Pakistani army said their troops killed 14 militants. The military's account could not be verified.
The Pakistani Taliban faction called The Malakand also issued a statement claiming responsibility for the attack and threatening more bloodshed.
"Our fight will continue until the establishment of sharia law in Pakistan ... We will fight whoever tries to stand in our way," Sirajuddin Ahmad, the faction's spokesman, told Reuters.
Ahmad claimed the group had killed 17 Pakistani soldiers.
In a separate attack in southern Pakistan, Taliban gunmen attacked the offices of Aaj TV in Karachi, injuring a guard and an employee, police official Abdus Salam Shaikh said.
Pakistani Taliban spokesman Ahsanullah Ahsan claimed responsibility for attack. He said the Taliban attacked the TV station after it failed to broadcast the group's statement on the Upper Dir attack.
He also said other media would also be targeted if they failed to broadcast Taliban's statements.
The latest surge of violence came as relationship between the two neighbours have become increasingly strained with Pakistan complaining militants find refuge in areas close to the border in Afghanistan and attack Pakistan front there.