President Donald Trump thanked the government of Pakistan for assisting in the release of a U.S. hostage and her family held in held in captivity for five years – and said the nation was beginning to 'respect' the U.S.

American Caitlan Coleman, 31, was freed Wednesday night along with her husband Joshua Boyle, 34, and their three young children in an exchange facilitated by Pakistan.

Coleman and her husband had been kidnapped traveling in Afghanistan and had been held for five years.

'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,' Trump said at the White House before signing an executive order to try to roll back Obamacare.

President Trump praised Pakistan for its help in freeing an American and her family held hostage for five years, saying: 'I believe they're starting to respect the United States again'

'I want to thank Pakistan. They worked very hard on this,' Trump said. 'And I believe they're starting to respect the United States again. It's very important.'

The president added: 'A lot of countries are starting to respect the United States of America once again.'

The praise comes after years of tensions between the two nations that have flared up on numerous occasions.

The Pakistani government has chafed at the U.S. drone program targeting terrorists and militants hiding out in lawless tribal areas. Top terror target Osama Bin Laden held out inside Pakistan for years before he was killed in a Navy SEAL operation.

The U.S. has pushed Pakistan to do more to confront the Haqqani terror network as Trump steps up the U.S. military role in Afghanistan.

Trump alluded to the news Wednesday night at a Pennsylvania speech on tax cuts, again discussing Pakistan's assistance in terms of 'respect.'

R-E-S-P-E-C-T: The president said at the White House that 'a lot of countries are starting to respect the United States of America once again'

'Something happened today, where a country that totally disrespected us called with some very, very important news,' Trump said before it was made public.

'And one of my generals came in. They said, 'You know, I have to tell you, a year ago they would've never done that.' It was a great sign of respect.'

'You'll probably be hearing about it over the next few days,' Trump forecast. 'But this is a country that did not respect us.'

'This is a country that respects us now. The world is starting to respect us again, believe me,' Trump said.

Caitlan, who grew up in Stewartstown, Pennsylvania, was allowed to write letters to her family during her captivity. She told them how she had changed in prison and as a mother

When they were abducted, the couple's relatives said they were innocent but naive adventure seekers. They had been married for a year when went to Afghanistan

Caitlan Coleman and her Canadian husband Joshua Boyle were released along with three of the children they welcomed in captivity on Wednesday night. They are seen in a video filmed in 2016 with two of their children

Pakistan's former petroleum minister and prime minister designate Shahid Khaqan Abbasi (C) leaves with his party leaders after a meeting at Parliament House in Islamabad on August 1, 2017.

Pakistan's parliament was set to elect a new prime minister on August 1, after the Supreme Court ousted Nawaz Sharif following an investigation into corruption allegations against his family

THANKS FOR HELPING! The house where Osama bin Laden was finally hunted down is large but rather ordinary-looking, set in a compound in an affluent suburb of Abbottabad, only about a mile from the Pakistan Military Academy, Pakistan's most prestigious military training center. The 3-story house is white with a little brick structure on the roof. The red cloth screen erected on one side of the compound, is where the helicopter is said to have crashed

In this handout image provided by The White House, President Barack Obama, Vice President Joe Biden, Secretary of State Hillary Clinton and members of the national security team receive an update on the mission against Osama bin Laden in the Situation Room of the White House May 1, 2011 in Washington, DC. Obama later announced that the United States had killed Bin Laden in an operation led by U.S. Special Forces at a compound in Abbottabad, Pakistan

Coleman, an American, her Canadian husband and the three children they had in captivity have been released after spending five years as hostages of a Taliban-linked terrorist network.

The woman and her husband were abducted in October 2012 by the Haqqani network as they traveled through Afghanistan, a country they traveled to without telling their families.

On Wednesday night, President Trump alluded to the family's release during a speech in Coleman's home state of Pennsylvania (above)

Friends say Boyle, who was previously married to terror suspect Omar Khadr's sister, was 'passionate' about the country.

On Thursday, President Trump revealed that the pair have been held in Pakistan ever since and that it was the country's government which helped secure their release after years of failed attempts by the Obama administration.

Caitlan, who grew up in Pennsylvania, was pregnant with their oldest son when she was captured. She has since welcomed another little boy and a girl who was born a few months ago.

In hostage videos filmed in 2016, she alluded to other children she had given birth to or carried but who did not survive.