Joshua Boyle’s life had descended into a surreal, five-year nightmare — but one thing was still beyond belief.

Boyle and his pregnant wife had been kidnapped by affiliates of the Taliban on a trip to Afghanistan in 2012. The captors had later killed his infant daughter, he said, and raped his wife, who described the ordeal as a “Kafka-esque nightmare.”

Sometime late last year, the couple were about to make a video to show their loved ones that they were, in fact, still alive.

But surely one captor was lying, Boyle believed, when he said that Donald Trump had been elected leader of the free world.

“It didn’t enter my mind that he was being serious,” Boyle, a Canadian national, told the Toronto Star a week after being rescued.

The last time Boyle had unfettered access to a news source that wasn’t an armed kidnapper, Trump was a presidential pretender who had flirted with formally entering the 2012 race.

His top issue at the time appeared to be whether President Barack Obama was, in fact, born in the United States. But Trump later announced that he was tabling his political aspirations and focusing on his business empire and his reality TV show.

“Business is my greatest passion and I am not ready to leave the private sector,” Trump said when he made the announcement in 2011, according to the Guardian newspaper.

A poll conducted at the time showed that 71 percent of people thought that Trump had no chance of becoming president — including, apparently, a Canadian call center operator who was pining to help people in remote regions of Afghanistan.

Boyle, Coleman and their three children — all of them born in captivity — were rescued Wednesday in Pakistan, where their Haqqani network captors had shuttled them after kidnapping the couple in Afghanistan.

In comments to reporters, Boyle described himself as a pilgrim and said he and his wife went to Afghanistan to try to help “the most neglected minority group in the world, those ordinary villagers who live deep inside Taliban-controlled Afghanistan … where no NGO, no aid worker and no government has ever successfully been able to bring the necessary help.”

It’s unclear what help the couple thought they could provide — and what exactly they were doing when they were captured in the southeastern part of the country by the family-based militant group with close ties to the Taliban.

The Star called the Haqqani network “skilled kidnappers” who often hold Western hostages for years while negotiating financial deals for their release.

The group had also held U.S. Army Sgt. Bowe Bergdahl, before releasing him in a 2014 prisoner exchange.

Over five years, Boyle’s captors shuttled his growing family to impromptu prisons in two countries, including empty houses and an “underground dungeon.”

Boyle has spent the past week describing the ordeal — bathtub-size cells, a forced abortion, devastating boredom — and calling for his captors to be brought to justice.

Boyle and Coleman also are helping their children adjust to a world in which they are not “bandi,” the word the terrorists used for their captives.

As the Star reported: “Jonah was fascinated by flushing the toilet, and had dirty pants and bare feet from digging in the vegetable garden. Noah, 2, played with wooden trains with his mother and aunt Heather. Boyle’s mother, Linda, found the best position to soothe her months-old granddaughter, Grace, was snug against her side, cradled like a football.”

And their release was being heralded by the White House.

“Yesterday, the United States 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,” read an Oct. 12 news release.

The title of the release began with words Boyle could once hardly believe: “Statement from President Donald J. Trump.”

Read more: