"Pak Army recovered five Western hostages including one Canadian, his U.S. national wife, and their three children from terrorist custody," an army statement said on October 12.
It said that Pakistani soldiers rescued the family during an operation in the northwestern Kurram tribal district near the Afghan border after receiving intelligence from U.S. officials.
It did not name the family, but Canadian Joshua Boyle and his U.S. wife, Caitlan Coleman, were kidnapped while backpacking in Afghanistan in 2012.
Coleman was pregnant at the time, and the couple is known to have had children while in captivity.
The Afghan Taliban-aligned Haqqani network released videos of the couple during their captivity.
The latest video, which was released in December 2016, showed the couple with two young boys. In it, Coleman begged for an end to their "Kafkaesque nightmare."
The Haqqani network has been demanding the release of three of its prisoners in Afghanistan.