A Canadian man who was rescued from his terrorist captors along with his American wife and their three children after spending five years as hostages refused to board a US military plane on Thursday over fears he will now face punishment over his first marriage to a known terror suspect.

Caitlan Coleman, 31, was given back to US commandos along with her husband Joshua Boyle, 34, and their three young children after being rescued by Pakistani forces late on Wednesday night.

They were being transported in the trunk of a car from one location to another by their Haqqani-network captors when Pakistani forces ambushed their convoy and rescued them.

There was a shootout and Boyle told relatives the last words he heard were his kidnappers shouting 'kill the hostages'. He was wounded by shrapnel and his captors were killed, one official said.

President Trump celebrated their release as a joint effort between US and Pakistani officials on Thursday.

However, Boyle is refusing to get on a US military plane at the air base in Bagram.

Instead, he wants to go to Islamabad - where the Canadian military has a base - and board one of its aircraft, according to The Toronto Star which has been in contact with his parents.

They say he fears he will be punished for his first marriage to al Qaeda supporter Zaynab Khadr, the older sister of Omar Khadr who spent eight years between 2002 and 2010 in Guantanamo Bay for war crimes he still denies.

Scroll down for videos

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

The couple (shown above before they were captured) were traveling in Afghanistan when they were taken. He is now reportedly refusing to board a plane back to the US

Other military sources say he was previously questioned in Canada over his ties to the family.

Boyle and Khadr were married between 2009 and 2010. They grew close when he volunteered to be the family's spokesman during the media row surrounding Omar's detention.

A year after they separated, Boyle and Coleman - who have been friends since they were teenagers - got married.

Between 2009 and 2010, Boyle was married to Zaynab Khadr whose father was a close friend of Osama Bin Laden and who defended the 9/11 attacks. She is a Canadian citizen but is now believed to live in Sudan with her fourth husband and four children

In 2012, when she was five months pregnant, he took her to Afghanistan, a country he was 'passionate' about, and they were captured.

White House Chief of Staff Gen. John Kelly said on Thursday afternoon that troops had given Boyle and Coleman the option of going either to Canada or the US.

He did not confirm whether or not they have yet left Pakistan but said they have 'essentially been living in a hole for five years'.

Since then, they have welcomed two sons and a daughter. In hostage videos, Coleman, who grew up in Pennsylvania, described being defiled in front of their children and suggested they'd had others who have died in captivity.

Friends of Boyle's previously said Boyle had an 'academic interest' in terrorism and may have been converting to Islam when he was captured.

'Josh said he was doing pretty well for someone who has spent the last five years in an underground prison,' Patrick Boyle, the man's father, told The Toronto Star.

Caitlan's family in Pennsylvania taped a statement to their front door on Thursday after the news broke.

'The Coleman family appreciates all the interest and concern being expressed at the joyful news that Caity, Josh and our grandchildren have been released after five long years in captivity.

'At this time, we ask that everyone respect our privacy as we make plans for the future,' it said.

Before Thursday, he and Caitlan were last seen in a video that was sent to their families in January with their two young sons.

Their daughter has never been seen and her existence only became known on Thursday when Boyle phoned his parents to confirm he was safe.

No ransom had ever been requested by their captors. Instead, the terrorists wanted US and Canadian officials to secure the release of Afghan prisoners in Kabul.

In hostage footage, Caitlan was dressed in a headscarf sitting next to her husband and their children who were seen for the first time.

The youngest boy, who was believed to have been born last September, had a pacifier in his mouth.

A second video showed the pair in January this year. Caitlan is cradling their two-year-old son and the four-year-old boy sits on Joshua's lap

TERROR LINKS OF CAPTIVE COUPLE: Joshua Boyle's previous marriage to daughter of 'Canada's first family of terrorism' Before he married Caitlan Coleman, Joshua Boyle was connected with Canada's 'first family of terrorism'. In 2009, he married Zaynab Khadr, the older sister of Guantanamo detainee Omar Khadr and the daughter of Ahmed Khadr, one of Osama Bin Laden's closest friends. The pair grew close after Joshua worked on Omar's case. He volunteered to be the family's spokesman after Omar was sent to Guantanamo when he was 15 for allegedly murdering a US soldier during a battle in Afghanistan. Friends say he was fascinated by terrorists and 'deeply cares about justice' which is why he got involved. He believed Omar - who was 15 when he allegedly threw the grenade - should never have been treated as a terrorist. They said at the time that at best, Omar was a child soldier. Omar Khadr was 15 in 2002 (left), the year in which US officials say he tossed the grenade which killed US Sergeant Christopher Speer (right) in Afghanistan. He was captured and was sent to Guantanamo Bay Through his time working with the family, he became close with Zaynab. Zaynab shot to infamy in 2004 when she defended the 9/11 attacks in an interview about her younger brothers imprisonment. In 2009, Zaynab and Boyle married. They divorced the following year. He was already friends with Coleman, who he'd befriended on the internet as a teenager. In 2011, they got married and the following year, he took her backpacking in Afghanistan when she was five months pregnant - setting in motion the chain of events which would lead to their capture and release five years later. Joshua met Omar's sister Zaynab (above) through his work on behalf of Omar and they got married in 2009 The Khadr family have been dubbed Canada's 'first family of terrorism' over their links to al Qaeda. In 2002, Omar was accused of killing American soldier Sgt Christopher Speer with a hand grenade in Afghanistan and planting mines to target US vehicles. Omar spent eight years in Guantanamo before being released to Canadian authorities in 2010. He was released on bail in 2015 and is pictured above that year He was captured and sent to Guantanamo Bay where he spent eight years before pleading guilty to war crimes which resulted in an eight year sentence. He was then moved to Canada to serve out the remainder of the sentence and, in 2015, was released on bail. Since then, he has asked to have unsupervised communication with his older sister, who now lives in Sudan. His request was turned down. The Khadr family is linked to al Qaeda, the fanatical organization founded by Osama Bin Laden. Unlike the Taliban, which is focused on building an Islamic state leadership in Afghanistan alone, al Qaeda's ambition knows no geographical boundaries. Advertisement

In as statement on Thursday, President Trump commended Pakistani officials for facilitating the exchange and said it was symbolic of the country's renewed relationship with the US.

'Yesterday, the US Government working in conjunction with the Government of Pakistan, secured the release of the Boyle-Coleman family from captivity in Pakistan

'Today they are free. This is a positive moment for our country's relationship with Pakistan.

'The Pakistani government's cooperation is a sign that it is honoring America's wishes for it to do more to provide security in the region.

'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,' he said.

Later, at a press conference, he said: 'They worked very hard on this and I believe they are starting to respect the US again. A lot of countries are starting to respect the US once again.'

Trump had criticized the country in the past for not doing enough to crack down on the Haqqanis. His administration has cranked up the pressure on the Pakistani government to do more in the global fight against terror.

On Wednesday, before the family's release was confirmed, the president alluded to it during a speech in Coleman's home state.

2013: In one of their first videos in captivity, the pair look forlorn as they address the camera. Joshua was drastically thinner than he had been when they were captured and he had a long, unkempt beard

2013: Joshua has been allowed to trim his beard and appears to have put on weight while Caitlan remains gaunt

By 2016, Caitlan had given birth to at least two boys. She appeared as downcast as she did in previous videos. Joshua had been allowed to shave and returned to wearing Western clothes

KIDNAPPED COUPLE DELIVERED THEIR CHILDREN BY FLASHLIGHT AND PRETENDED THEY WERE IN A GAME TO SHIELD THEM FROM HORROR OF CAPTIVITY The couple are seen before their release In letters to his family sent during their years of captivity, Joshua Boyle told in heartbreaking detail how he and his wife tried to shield their children from the horrors of their reality by pretending it was all a game. In September 2015, he delivered their second son by flashlight and had to plead with their captors to bring food to keep the infant alive. They had kept the pregnancy a secret. In a desperate bid to protect their young children from understanding that they were captive, they pretended it was all a game. He took inspiration from the film Beautiful Life which tells the story of a Jewish family in a Nazi concentration camp and its father who tries to shield the kids from understanding their surroundings. 'We are trying to keep spirits high for the children and play Beautiful Life,' Boyle wrote in one letter to his family that they shares with The Toronto Star. In September 2016, he described the birth of their second son. 'Ta-da! The astonished captors were good and brought all our post-partum needs, so he is now fat and healthy, praise God,' he said. The couple welcomed a daughter earlier this year. She and their two sons were released with them on Thursday. In their replies, Boyle's parents commended their parenting techniques. 'You and Cait sound like amazing parents, holding up each other and your boys, and protecting them from their horrible reality. I could only hope I would be able to do that in similar circumstances,' one read. In one video, Caitlan compared herself to Disney characters. 'My time in—married, and my time as a mother, and my time in prison that I’ve become more of a Belle than an Ariel,' she said. Her father Jim told ABC News earlier this week: 'She is telling me, "Dad, I wish had listened to you more and not been Ariel and more a Belle. It's a lot of humility and self-analysis of why she is in this situation.' Joshua and Caitlan married in 2011. They had been friends for years after striking up a relationship as teenagers online where they bonded over their mutual love of Star Wars. Advertisement

Caitlan Coleman's family placed this statement on their front door on Thursday to plead for privacy

Local media surrounded the Coleman family home in Stewartsown, Pennsylvania, on Thursday

'Something happened today, where a country that totally disrespected us called with some very, very important news.

TRUMP CONFIRMS FAMILY'S RELEASE In 2012, Caitlan Coleman, an American citizen, and her husband, Joshua Boyle, were taken captive and held hostage by the Haqqani network, a terrorist organization with ties to the Taliban. Ms. Coleman gave birth to the couple's three children while they were in captivity. Yesterday, the US Government working in conjunction with the Government of Pakistan, secured the release of the Boyle-Coleman family from captivity in Pakistan. Today they are free. This is a positive moment for our country's relationship with Pakistan. The Pakistani government's cooperation is a sign that it is honoring America's wishes for it to do more to provide security in the region. 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. Advertisement

'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. 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,' he said cryptically.

On Thursday, White House Chief of Staff General John Kelly said the exchange was proof of Pakistan's restored faith in its relationship with the US.

'I think there's been a change in the cooperative relationship in Pakistan.

'The good news is officials got custody of the American citizens, the woman and the three children, and the Canadian husband.

'They're now being cared for as we speak,' he said.

In 2014, Coleman pleaded with President Barack Obama to bring her and her husband home.

'I am prisoner of the Taliban.

'I would ask that my family and my government do everything that they can to bring my husband, child and I to safety and freedom,' she said.

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

In another video in December 2016, The pair addressed Trump who, at the time, had recently won the presidential election and was preparing for his inauguration.

'Donald Trump, the legacy of a millenia of demon worship in this country, is that those who speak high and noble of Islamic ideals are not simply going to release our family easily because it is correct.

'They want money, power, friends. 'You must give them these things before progress can be made,' she said.

In the first videos, Joshua appeared gaunt and drastically thinner than he had been when the pair were taken. He also appeared to have grown a long, unkempt beard.

In 2014, the couple's families were given false hope that they would be released.

Army Sgt. Bowe Bergdahl had just been released after five years in captivity with the same network. Coleman's family hoped at the time that Caitlan and Joshua would be released as part of the same deal but they were not.

In a deal with his captors, Obama allowed five Guantanamo Bay detainees to be released to Qatar. They were all connected to the Haqqani network.

Canadian Prime Minister Justin Trudeau, who was at the White House on Wednesday, has not spoken of Boyle's release and is not thought to have had a role in securing it

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 in 2012

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

After his release and return to the US, Bergdahl was charged with desertion and misbehavior before the enemy.

WHAT IS THE HAQQANI NETWORK? Coleman and Boyle were kidnapped by members of the Haqqani Network which is a sophisticated branch of the Taliban. It is considered to be one of the most brutal and deadliest insurgent groups in the region and has been blamed for suicide bombings as well as battles against US and Afghan forces. The network was founded in 1995 by former anti-soviet commander Jalaluddin Haqqani who pledged his allegiance to the Taliban at the time. In 1996, Haqqani Network fighters were instrumental in helping the Taliban claim the capital, Kabul. It is now headed by Jalaluddin's son, Sirajuddin, who is also the deputy leader of the Taliban. Their focus in recent years has been securing the release of Anas Haqanni, another of Jalaluddin's other sons who has been in the custody of Afghan authorities in 2014 as he visited the five terror suspects who Obama released to Qatar in exchange for US Sergeant Bowe Bergdahl. Anas is due to be executed by Afghan authorities. The Haqqani Network says it will respond with devastating retaliation if they follow through with his execution. Advertisement

Army officials say he abandoned his post before he was taken hostage and that the decision exposed others to threat.

He had denied the charges until Thursday when suddenly, as news of Coleman and Boyle's release spread, it emerged he was considering a plea deal in his military court case.

Trump has not indicated what concessions he made - if any - to facilitate Coleman and Boyle's release.

There is no evidence yet to suggest that the development in Bergdahl's case and Coleman and Boyle's release are connected.

President Trump repeatedly referred to Bergdahl throughout his campaign as a 'traitor'.

The veteran's military lawyers said it prevented him from getting a fair trial.

For years as they waited for word from either the Canadian government or US officials, the Boyle and Coleman families made their own attempts to see their loved ones go free.

In one video, Boyle's mother appeared wearing a headscarf in an effort to win over their captors.

They have spoken in other interviews about receiving letters from the pair in which they proudly described their two young sons.

In a piece for The Toronto Star published in June, Joshua's sister wrote: 'In one of his letters Josh talks about how he and Caity are educating the boys “as best as the dire circumstances allow.”

'He goes on to brag about how Primus (who is roughly 4 years old) knows his times tables up to five times five, the taxonomic ranks (species, kingdom, genus, etc.) and even some Latin.'

Bowe Bergdahl was released by the same terror group in 2014 after five years of captivity. He had been taken hostage by the Haqqani network after allegedly deserting his post in Afghanistan. He was charged with desertion upon his return to the US and, on Thursday, scheduled a court hearing to enter a plea - a move which coincided with Coleman and Boyle's release

In this 2014 photograph, Caitlan's parents Lyn and Jim (right) appear with Patrick and Linda Boyle (left) holding a photograph of the couple

Primus and Secondus, she said, were the names she and her other siblings had given their nameless nephews.

The couple's families previously described them as 'naive adventure seekers' who were avid travelers.

When they were taken from Afghanistan in 2012, they had already completed ambitious and potentially dangerous trips in Central America.

Their plan in 2012 was originally to hike through Russia and Central Asia before settling back in New Brunswick to raise their family.

Friends questioned why Joshua - who had ties to the Khadr family and 'may have been converting to Islam - went to Afghanistan in 2012

They hiked through Uzbekistan, Kazakhstan, Kyrgyzstan and Tajikistan then went to Afghanistan which relatives said was not on their list of scheduled stops.

After sending an email to his family from an internet cafe in Kabul on October 8, Boyle and his wife vanished.

One friend in the region said he had tried to convince him to join them in Kabul before they vanished.

Richard Cronin said he'd met the pair in Kyrgyzstan where he said Josh tried to convince him to join them.

'I hadn’t thought seriously about travelling to Afghanistan until I started talking to Josh at Nomad’s Home Hostel in Bishkek.

He was planning to travel there with his wife Caitlan very shortly.

'Over the course of a conversation that ran long into the night he planted in my head a strong desire to go,' Cronin said in a blog post in November 2012.

Cronin recalled how Joshua said he was inspired by 'Lawrence of Arabia' and Richard Burton and asked him: 'Wouldn’t you like to be like one of them?'

He then also said that the window of opportunity for visiting the country was narrowing and that it was most safe in 2012 because of the large presence of US troops there.

Cronin went to Afghanistan with another friend and learned of Caitlan and Joshua's kidnap when he was there. He left afterwards, he said.

Coleman and Boyle met as friends on the internet when they were teenagers and bonded over their mutual love of Star Wars

In an article published by Medium in 2015, one of Joshua's friends told how he had always been interested in Afghanistan and Islam.

He said he was viewed as a 'trouble maker' by the then Conservative Canadian government and that he enjoyed 'thumbing his nose' at authorities.

The author, who met him in 2002 - the same year Omar Khadr was detained - said he feared he may have 'bitten off more than he could chew' with his bold travels to Afghanistan.

'Joshua has a loose connection to Afghanistan, a deep respect for Islam — he may even have been in the process of converting — and a purely academic interest in terrorism, but none of that even remotely qualifies him to travel safely in Afghanistan.

'It could have been simple naiveté, but I, and many others, have always known Joshua as an exceptionally cunning and savvy man.

'Maybe he was overconfident. Maybe he was immature. Maybe this time Joshua just bit off more than he could chew,' he said.