A military statement says the bomb went off Sunday on a mountainous route in the Kurram tribal region.
It says the troops were taking part in a search operation for the militants who had held an American-Canadian family that was rescued last week.
Pakistani security officials said three bombs went off in the attack, which was claimed by the Pakistani Taliban. The officials spoke on condition of anonymity because they were not authorized to brief reporters.
Pakistani forces, acting on intelligence supplied by the U.S., freed the couple along with their three children — all born in captivity. The couple had been held by the Taliban-linked Haqqani network for five years.