WASHINGTON (Reuters) - A 20-year-old Virginia man, who posted warnings to the makers of animated TV show “South Park” in April, was arrested on Wednesday on charges of providing material support to an extremist group that has ties to al Qaeda, the U.S. Justice Department said.

The defendant, Zachary Adam Chesser, a U.S. citizen living in Fairfax County in Virginia, told federal agents that he attempted twice to travel to Somalia to join the al Shabaab group as a foreign fighter, the department said.

Chesser told U.S. agents his mother had received death threats after postings he made on the Internet about the “South Park” satirical animated television show.

The show on cable channel Comedy Central in April showed the Prophet Mohammad in a bear outfit. Most Muslims consider any depiction of the founder of Islam as offensive.

The Internet postings showed a graphic picture of slain Dutch filmmaker Theo Van Gogh and warned “South Park” creators Matt Stone and Trey Parker they risked meeting the same fate.

Chesser was prevented from boarding a flight from New York to Uganda on July 10. He admitted that he intended to travel from Uganda to Somalia, according to an FBI affidavit filed in federal court in Virginia.

Chesser said he had planned to join al Shabaab, but that he had a change of heart after learning about the deadly bombings in Uganda earlier this month for which the group has claimed responsibility. One American was among the 73 that were killed in the attack.

In 2008, the U.S. State Department designated al Shabaab as a foreign terrorist organization. U.S. officials have said many of the group’s senior leaders are believed to have trained and fought with al Qaeda in Afghanistan.

Chesser told agents he became interested in Islam in July of 2008. Chesser said he did not support acts of terrorism or violence, but that he wanted the United States to fail in its overseas military efforts.