(CNN) An Ontario judge Thursday dismissed 19 charges against a Canadian man who spent five years with his family in militant captivity in Afghanistan, according to court documents.

Joshua Boyle, who returned to Canada with his American wife and three children following their release, faced 19 charges in connection with incidents alleged to have happened since the family's return in 2017, including charges of assault, sexual assault, uttering a death threat, and criminal harassment brought by his wife, Caitlan Coleman.

He has denied the allegations.

Boyle and Coleman were kidnapped in 2012 in Afghanistan by terrorists from the Taliban-affiliated Haqqani network. Coleman was pregnant, and the couple had two more children during their five years in captivity. The couple and their children were freed in a mission carried out by Pakistani security forces based on intelligence from US authorities.

When Boyle arrived back in Toronto in 2017, he told reporters his captors authorized the killing of one of his children and raped his wife. He did not say whether the militants killed a child, only that his captors were responsible for "authorizing the murder" of his infant daughter. At that time, sources close to the family said that Boyle alluded to at least one forced abortion while in captivity.

The couple also had a child after Boyle was arrested in Canada, Boyle's attorney Lawrence Greenspon told CNN.

In the court ruling to dismiss the charges against Boyle, Judge Peter Doody of the Ontario Court of Justice, said that there were credibility problems in the case, including evidence from Boyle and Coleman. No further details will be revealed since the court has issued an order that prevents media from reporting information that would identify some potential victims or witnesses.

Greenspon said Doody spent three and a half hours reading his decision to the court.

"He went through all the evidence of both Joshua and Caitlan, and reached a decision with which Joshua and his family, and we are very pleased," Greenspon said. "For them, this is really the first step to obtaining their main priority, which is access and eventually hopefully custody of the four children."

"Since Josh's arrest on December 31, 2017, he has not seen any of the children. And given that the date of birth of the fourth child was some time after that, he has never, ever seen his fourth child," Greenspon added.

Coleman's lawyer said he spoke to his client and she needs some time to digest the judge's decision and try to move on with her life.

"She's devastated by the verdict," attorney Ian Carter told CNN. "I believe this case is an example of the challenges a complainant faces coming forward with allegations of sexual assault or domestic violence, at least in the criminal courts."

Boyle and Coleman are still married but divorce proceedings are underway, Greenspon told CNN.