A Canadian man who was held hostage by the Taliban for five years in Afghanistan with his American wife told a court Tuesday that he only struck her with a broom handle because she asked to be spanked.

Joshua Boyle, 36, claimed during cross-examination in his sexual assault trial that he gave his estranged wife Caitlan Coleman “a few half-hearted swats” on the buttocks at her request, the Ottawa Citizen reported. He reportedly said Coleman “enjoyed it,” although the act made him uncomfortable.

EX-TALIBAN HOSTAGE ACCUSED OF ACTING LIKE EXTREMIST 'CAPTORS' TOWARDS HIS WIFE, TYING AND FORCING HER TO HAVE SEX

Boyle said he would stop spanking her when she showed any discomfort and “was tired of indulging her fantasies,” according to the paper.

Boyle faces 19 charges, including sexual assault and administering a noxious substance. He had pleaded not guilty to all the charges, which allegedly took place after the couple’s release in 2017.

Both Boyle and Coleman were captured by a Taliban-linked group in 2012 while on a backpacking trip in Afghanistan. During their five years in captivity, she gave birth to three children. The family was freed in 2017 by Pakistani forces.

Boyle also argued against allegations that he drugged Coleman with the anti-depressant trazadone. He told the court he offered her the pills when she threw a “fit” after suggesting she shower before going to meet his parents, the Guardian reported. He claimed that Coleman didn’t bathe enough after their release from captivity.

“I don’t remember if I invoked the fact both my mother and father had complained about Caitlan’s hygiene,” he said, according to the paper. “Meeting in public was often embarrassing for them.”

FORMER TALIBAN HOSTAGE CAITLAN COLEMAN ACCUSES HUSBAND OF ABUSE DURING CAPTIVITY: REPORTS

Earlier testimony showed both parties painting each other as abusive. Boyle accused Coleman of being an incompetent mother who would neglect their children while in captivity and strike their eldest child after their return to Canada.

Coleman had claimed Boyle was controlling and abusive, both during and after their captivity. She described behavior by Boyle that she said led to a violent assault after they returned to Canada. he allegedly demanded sex, then hit her after she refused.

CLICK HERE FOR THE FOX NEWS APP

She also claimed to have taken medication Boyle offered her out of fear he would hit her.

Boyle is expected to testify again Wednesday.

Fox News' Lukas Mikelionis contributed to this report.