The incident happened near the Kharlachi checkpoint in Kurram district in the restive tribal belt bordering Afghanistan
Bomb kills four Pakistani troops searching for kidnappers
A bomb on Sunday killed four Pakistani soldiers as they searched for militants linked to the kidnapping of a US-Canadian family who were freed last week.
The incident happened near the Kharlachi checkpoint in Kurram district in the restive tribal belt bordering Afghanistan.
The family were being held by the Taliban-allied Haqqani network in the tribal area until they were rescued during a Pakistani military operation on Wednesday.
"Four security force troops including a captain embraced shahadat [martyrdom] while three others sustained injuries when an improvised explosive device went off," the military said in a statement.
"The troops were part of a search party for handlers of the rescued foreigners," it added without offering further details.
Officials told AFP the search party belonged to the Frontier Corps, a paramilitary force that provides security in Pakistan's tribal belt.
Joshua Boyle and his American wife and three children were freed after five years of captivity at the hands of the Haqqani network, a notorious militant group that operates on both sides of the Afghanistan-Pakistan border.
The Haqqani network is headed by Sirajuddin Haqqani, who is also the Afghan Taliban's deputy leader.
In a chilling statement on the family's arrival in Toronto, Mr Boyle accused his kidnappers of murdering their infant daughter and raping his wife, Caitlan Coleman.
Pakistan, which has long been accused of having links to groups such as the Haqqanis, has faced increased pressure from Washington to crack down on militants after it was lambasted by US president Donald Trump in August.
Following the family's release, Mr Trump tweeted that relations were improving and thanked Pakistan for "their cooperation on many fronts".