An ice cream shop owner from Yemen was sentenced to 15 1/2 years in prison Friday for illegally funneling nearly $22 million overseas in a case stemming from a major terrorism investigation.

Abad Elfgeeh, 51, was convicted last year of running an illegal money-transmitting business and structuring bank deposits to avoid reporting laws. Prosecutors alleged that at the behest of a radical Yemeni sheik, he sent money around the world from bank accounts linked to his tiny storefront in Brooklyn.

Before being sentenced by U.S. District Judge Sterling Johnson, the defendant — a naturalized U.S. citizen — insisted he was a loyal American who didn't realize he was breaking the law by helping fellow immigrants transfer money to relatives in their homeland.

"While it is true that I am an active member of the Yemeni community in this city, and I am a Muslim, these affiliations have not interfered with my pledge of allegiance to this country," he said, reading from a prepared statement.

In court papers, prosecutors had accused Elfgeeh's lawyers of "grossly mischaracterizing the defendant as a naive, innocent pawn who had no idea that what he was doing was wrong."

The defendant "participated in this scheme day after day, over a period of years," prosecutors added.

Elfgeeh was not charged with any terrorism-related crime. The government alleged that his business was used by Sheik Mohammed Ali Hassan Al-Moayad in a scheme to fund Al Qaeda and the Palestinian militant group Hamas. He was portrayed as the mastermind of a complicated arrangement of "feeder accounts" and international transfers designed to hide the huge outflow of cash from his ice cream store.

Witnesses testified Al-Moayad kept Elfgeeh's number in his phone book and called Elfgeeh someone he trusted to transfer money from the United States to Yemen.

The judge ordered Elfgeeh to pay a $1.5 million fine. He also will be forced to forfeit more than $22 million, which would empty his frozen bank accounts.