President Trump thanked the government of Pakistan on Thursday for its cooperation in rescuing an American woman and her family held captive by terrorists for five years, and said he hopes their release will usher in a new period of "cooperation and teamwork" between the two countries.

"The Pakistani government's cooperation is a sign that it is honoring America's wish that it do more to provide security in the region, and I want to thank the Pakistani government. We want to thank Pakistan," Trump said before signing an executive order on healthcare.

"They worked very hard on this, and I believe they're starting to respect the United States again. It's very important. I think a lot of countries, right now, are starting to respect the United States of America once again."

"We hope to see this type of cooperation and teamwork in helping secure the release of remaining hostages and in our future, joint counterterrorism operations," the president continued.

Pakistan's military said Thursday they secured the release of Caitlan Coleman, her husband Joshua Boyle, and their three children.

Coleman and Boyle, who is Canadian, were captured by terrorists while they were hiking in Afghanistan in 2012. They had since been held by the Haqqani network, a terrorist organization that has ties to the Taliban, in Pakistan.

Coleman was seven months pregnant with the couple's first child when they were abducted, and had all three of their children while in captivity.