A federal investigation of a North Carolina college student led to the arrest of the 18-year-old on child pornography charges.

Ameer Abu-Hammad drew the attention of authorities last fall when he posted to his Facebook account several time suggesting that he planned to travel to the Middle East to support ISIS, WRAL.com reported.

Federal agents searched his home and electronic devices for evidence of the support, according to the Daily Beast, but then went to visit him at college, where he asked them if they would search his phone for “other stuff.” 

RELATED: Mass. activists: Call Planned Parenthood attacks 'terrorism'

“The agents asked him to clarify and soon afterwards, he admitted that he had additionally used the phone to view pornogrpahy online that included minors,” a criminal complaint said according to the Daily Beast. 

Admitting to “viewing child pornography for roughly two months,” agents found material on Abu-Hammad’s devices featuring children as young as 6 to 9 months, and about 39 images, mostly of young girls, the Daily Beast reported.

A federal judge has ordered that Abu-Hammad remain in custody while he awaits trial, according to WRAL.com. No terrorism-related charges have been filed against him.