Video (54:05) : Community members and supporters reacted with shock and outrage after Amina Farah Ali of Rochester was sentenced to 20 years for supporting terrorists in her homeland of Somalia.

Two Rochester women were sentenced to federal prison Thursday for their roles in funneling money to an organization the U.S. government has called a terrorist group fighting in Somalia.

Hawo Mohamed Hassan, 66, who got 10 years in prison, and Amina Farah Ali, 36, who got 20, were the last of nine people sentenced in federal court in Minneapolis this week.

The group was the first set of defendants sent to prison from Minneapolis in this country’s largest anti-terrorism investigation since Sept. 11, 2001.

U.S. Chief Judge Michael Davis handed down the sentences before a courtroom packed with the defendants’ families and members of the Somali-American community.

The drama capped a federal investigation that lasted more than four years in which U.S. authorities sought to shut down a recruiting effort that lured more than 20 young men to Somalia, several of whom died fighting or in suicide bombings.

The two women sentenced for raising money for Al-Shabab had a number of supporters at the federal courthouse in Minneapolis. )

The women, both U.S. citizens who came here from Somalia, were convicted in 2011 of conspiring to provide material support to Al-Shabab in fundraising in Rochester that prosecutors have called “a deadly pipeline” of money and fighters from the United State to Somalia.

They have had wide support in the Twin Cities’ Somali-American community, and many in the courtroom were stunned by the sentences, especially the 20-year sentence for Ali.

Hassan Mohamud, a St. Paul imam, said he believes the sentences were too long and that both women should have been released.

“All they did was aid the poor and the orphans,” he said.

But prosecutors said it was clear from the phone conversations they monitored that the women knew they were raising money for Al-Shabab, a group labeled a terrorist organization by the U.S. State Department in 2008.

While Ali said she never knew that funds she raised were going to Al-Shabab, Hassan claimed that she came to realize the organization was getting the money and broke with Ali, preferring that the money go to set up a senior health center.

But prosecutor Jeff Paulsen cited telephone wiretaps that he said showed there had been no rift between the two and that Hassan had a financial investment in the health center and planned to continue to work with Ali.

Ali, sentenced first, denied she did anything wrong. She said she had no knowledge that the money she collected went to Al-Shabab.

Asked by Davis what she knew about Al-Qajda, she indicated she knew nothing about it.

Her attorney, Dan Scott, said “she chose the wrong horse,” adding, “She thought she was doing good work. She was wrong.”

Defendants in the Somali cases have argued that Ethiopia invaded Somalia to support a newly created transitional government that lacked support from the Somali people. They have said that their clients backed the resistance to the invasion.

However, prosecutors argued that the transitional government was recognized by foreign nations, so any support for Al-Shabab, which was fighting the invasion, was against U.S. law as well as support for a terrorist group.

Steven Ward, who prosecuted the case, said Ali was heard on a wiretap supporting Al-Shabab, saying she supported a suicide bombing and “let the civilians die.”

At Hassan’s sentencing, her attorney, Randy Daar said that in hindsight, she realized that Al-Shabab “has done terrible things.”

He said his client’s mother was raped and killed, dying in her daughter’s arms, and that her activity could be linked to post-traumatic stress syndrome.

But Paulsen said any PTSD link was unsubstantiated.

Hawo Mohamed Hassan, left, and Amina Farah Ali entering the federal courthouse during their 2011 trial.

Also Thursday, Abdarus Abdulle Ali, 29, was given two years for lying to a grand jury.

The Columbia Heights man had pleaded guilty in 2009 to lying to a grand jury about meetings he attended and money he contributed in support of Al-Shabab.