MINNEAPOLIS (AP) — A federal appeals court upheld the convictions and prison sentences Tuesday for two Minnesota women found guilty of conspiring to funnel money to a terror group in Somalia despite claiming they were collecting funds for the poor.

Amina Farah Ali, 39, and Hawo Mohamed Hassan, 68, were convicted in 2011 on one count of conspiracy to provide material support to a foreign terrorist organization, after prosecutors told jurors the women were part of a “deadly pipeline” that routed money and fighters to al-Shabab.

READ MORE: Early Voters In Minneapolis Need To Know These Key Rule Changes

Ali was also found guilty of 12 counts of providing such support and was sentenced to 20 years in prison. Hassan was convicted of two additional counts of lying to the FBI and received a 10-year sentence.

Defense attorneys appealed on several grounds. They argued that U.S. District Judge Michael Davis should have recused himself because he made several statements suggesting he equated fundamentalist Islam with terrorism and was prejudiced. A three-judge panel of the 8th U.S. Circuit Court of Appeals disagreed.

“This assertion is baseless,” the judges wrote. For example, during sentencing, Davis asked the women questions about the meaning of jihad and al-Shabab’s strict interpretation of Islam.

“Plucked from context, some of these questions may appear unconventional,” the judges wrote. “However, rather than showing bias or partiality, when viewed in context, these questions demonstrate that the court sought to comprehend Ali’s understanding of al Shabaab’s goals and actions, a legitimate topic for a sentencing court to explore” in a case of this nature.

Messages left with attorneys for both women were not returned Tuesday.

READ MORE: Train Carrying Ethanol Derails In Southern Minnesota Town

The women, both U.S. citizens of Somali descent, were among more than 20 people charged in Minnesota’s long-running federal investigations into recruiting and financing for al-Shabab, which the U.S. considers a terrorist group. Investigators believe more than 22 men left Minnesota to join al-Shabab since 2007.

Prosecutors said the women went door-to-door in the name of charity and held religious teleconferences to solicit donations, which they then routed to the fighters.

Defense attorneys painted the women as humanitarians who gave money to orphans and the poor, as well as to a group fighting to rid Somalia of foreign troops.

During the trial, Davis held Ali in contempt 20 times when she refused to stand for the court, citing her religious beliefs. Defense attorneys pointed to that as another reason for Davis to recuse himself. But the appellate court said Davis gave Ali a chance to explain herself, and the ensuing discussion shows the nature of the disagreement, not bias on Davis’ part.

Defense attorneys also argued that evidence obtained by wiretap violated the Constitution, the women’s trials should have been separated and that their sentences were unreasonable. The appeals court disagreed.

MORE NEWS: 'I Would Take A Drawing On A Napkin': Chief Arradondo Says No Elected Official Has Spoken With Him About The Public Safety Ballot Question

(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)