A husband and wife from Montgomery County each were ordered Thursday to spend more than a year in federal prison for sending money overseas to help two relatives travel to Syria and join ISIS.

Shahidul Gaffar, 40, and Nabila Khan, 35, both of Collegeville, admitted sending nearly $5,600 to Khan’s brothers in Bangladesh before they set out on their journeys in 2015.

But the couple cut unlikely figures as the central defendants in a federal terrorism case.

“God bless America, God bless the United States,” Gaffar said as he stood before U.S. District Judge Joshua D. Wolson. A naturalized citizen who has lived in this country for 26 years, raised his family here, and run restaurants in Montgomery County, he insisted he didn’t have an anti-American bone in his body.

His wife maintained their crimes stemmed more from love of her brothers than out of any support for ISIS or its ideology. “I’m really sorry about everything I did,” she said through tears. “… It has cost my family a lot.”

The nearly four-hour court proceeding in Philadelphia — which played out days before the 20th anniversary of the Sept. 11 attacks — brought into focus the persistent allure of extremist ideologies in the decades since but also the difficult choices and disastrous consequences facing some families of those caught in that web.

Khan has now lost both of her brothers — one confirmed dead in battle in Syria in 2019, the other missing and presumed dead.

Her husband is headed to prison for 18 months. And Khan, a legal permanent resident, will be deported back to Bangladesh after serving her prison term of two years.

News of the couple’s arrest by the FBI last year roiled the tight-knit Bangladeshi expat community and prompted banks to close their accounts and those of other family members living in the United States.

Meanwhile, the couple’s four children — ages 13, 11, 6, and 3 — are facing an uncertain future.

With both parents off to prison, “we can’t dream of anything,” their eldest daughter wrote in a letter to the judge. “The vision is blurry.”

Details of what led agents to the couple have remained shielded from public view. But Gaffar and Khan told the judge they felt strongly in 2015 that their family was unraveling.

When her elder brother — Junaid Hasan Khan — started talking about traveling to Syria, Khan flew with her children to Bangladesh to be with her family.

At the time, her other brother — Ibrahim Khan — was living with Gaffar in the United States, attending school in New York on a student visa. But after a breakup with a woman, Ibrahim abandoned his studies, returned to Bangladesh, and also began talking about joining ISIS.

Gaffar told the court Thursday that he and his wife foolishly indulged Ibrahim, hoping they could talk him out of going and fearing if they pushed back too hard it might push him away.

The money Gaffar sent to Bangladesh was mostly intended to support his wife while she was overseas, he said. Ibrahim had pressured her to give it to him instead.

“The thought process was: Since we’ve already lost one brother, let’s not lose another,” said Gaffar. “We tried to solve our own problem. This is why I didn’t go to the police here. This is why I didn’t alert police there. We thought we could handle it ourselves.”

Prosecutors expressed sympathy for that family dynamic in court Thursday but said none of that changed the fact that the couple had openly discussed — and at times expressed support for — the brothers’ plans.

“I do believe they are contrite,” said Assistant U.S. Attorney Sarah M. Wolfe. “Obviously, they’ve lost family members because of this. But I do think there’s an important message that needs to be sent: Material support [for terrorism], in any measure, is illegal and will not be ignored.”

Before her elder brother had even departed for Syria, Khan texted her twin sister in Bangladesh and asked her to sell some of her gold jewelry and give him the proceeds. Gaffar texted his mother-in-law, telling her to be proud of her son “for the noble cause and for the sake of Allah!!”

Meanwhile, soon after Ibrahim returned to Bangladesh, Gaffar expressed disappointment that he had remained behind in the U.S., which he described in a text as “the land of great unbelievers.”

And when Ibrahim later followed his brother to become an ISIS fighter, Gaffar expressed sympathy for his wife’s parents, but added: “At the same time, I feel very proud. What a lucky mom and dad.”

Gaffar said Thursday that he didn’t really believe any of those statements and that he only said them to keep open the lines of communication with his wife’s family.

“When you’re in a toxic situation, sometimes you just talk without knowing the consequences,” he said.

Wolson, however, wasn’t so sure. He rejected the couple’s request that they be sentenced to house arrest for their crimes. But the judge did agree to stagger their sentences — Khan will serve hers first, then Gaffar — to avoid leaving their children without a guardian.

“Family pressure can be great,” he said. “But there’s a part of me that thinks that people who love America don’t talk about it as the ‘land of unbelievers.’”