An Inter-Services Public Relations (ISPR) statement said the hostages were a Canadian, his American wife, and their three children.
After five years since being kidnapped by the Taliban in Afghanistan, a York County woman and her family have been freed.
Ms Coleman had told her family she gave birth to two children in captivity.
They last were seen in a hostage video taken in December 2016 begging their governments to save them.
Coleman was five-months pregnant at the time and the couple was backpacking through Central Asia.
Russia May Demand US Cut Diplomatic Staff
Earlier Russia's envoy to Washington Anatoly Antonov said he had sent a "decisive protest" to the U.S. over the removed flags. The demand followed a vote to tighten sanctions on Russian Federation .
"Something happened today, where a country that totally disrespected us called with some very, very important news", Trump said. But this is a country that did not respect us.
"They were captured by terrorists from Afghanistan in 2012 and kept as hostages there", the military's media wing said.
Coleman's parents last heard from their son-in-law on October 8, 2012, from an internet cafe in what Boyle described as an "unsafe" part of Afghanistan.
The U.S. has long criticized Pakistan for failing to aggressively go after the Haqqanis, who have been behind many attacks against U.S. and allied forces in Afghanistan.
And while Trump labeled Pakistan "a valued partner" in the past, he also said the United States had "been paying Pakistan billions and billions of dollars at the same time they are housing the very terrorists that we are fighting". This is a country that respects us now.