The overnight attack on Shidano Dand post in the Kurram region triggered clashes in which 18 militants were also killed, according to a senior military official.
"Armed militants stormed the post around midnight and killed seven soldiers," said the official, who did not want to be named, adding that troops retaliated killing 18 militants.
Other security officials also confirmed the attack.
Taliban spokesman Ehsanullah Ehsan in a telephone call to AFP claimed responsibility for the raid, saying 12 Frontier Corps soldiers were killed and four others captured by militants.
"We carried out this attack to avenge the killing of our commander Taj Gul in Khyber agency," Ehsan said, without giving details when he was killed and his significance to the group.
"We have killed 12 F.C soldiers and captured four others alive," he said, adding that militants also seized a large cache of weapons.
Independent confirmation of death tolls is very difficult in the tribal area, a Taliban and Al-Qaeda stronghold barred to journalists and aid workers.
The post is located between Kurram and North Waziristan tribal region on the Afghan border, a zone considered a stronghold of Pakistani Taliban and Al-Qaeda linked militants.
The region has experienced a spike in clashes in recent weeks.
On Tuesday dozens of heavily armed Taliban militants attacked a Pakistani military post in the area, sparking clashes that killed eight soldiers and wounded another 15, the military said.
Helicopter gunships were mobilised when the fighting broke out and officials said 35 militants were killed.
Last July, Pakistan launched an offensive to oust Islamist militants from Kurram, mirroring operations that it has carried out -- with limited success -- across much of the rest of the tribal belt, only for militants to regroup and return.
Pakistan's semi-autonomous tribal belt bordering Afghanistan is rife with a homegrown insurgency, Afghan Taliban and Al-Qaeda-linked militants.
On Monday, President Barack Obama confirmed for the first time that US drones target Taliban and Al-Qaeda militants in Pakistan's tribal badlands, a programme that has escalated under his administration.
Pakistan, whose relationship with the United States deteriorated in 2011 over the raid that killed Osama bin Laden and air strikes that killed 24 Pakistani soldiers, says more than 3,000 troops have died fighting militants.