WASHINGTON (Reuters) - A North Carolina man was arrested Thursday on a charge of conspiring to provide material support to the Islamic State militant group by attempting to recruit people to carry out an attack in the United States, the Justice Department said.

Erick Jamal Hendricks, 35, of Charlotte, contacted another man online in the spring of 2015, who was later arrested after attempting to purchase an AK-47 from an undercover officer, according to a court complaint.

Hendricks told another unnamed person his goal was to create a sleeper cell to be trained to carry out attacks in the United States.

The complaint alleges that Hendricks said his potential targets were military members, and a woman who had organized a Prophet Mohammed cartoon-drawing contest in Garland, Texas.

Gunmen opened fire at the event in May 2015, shortly after Hendricks was in contact with one of the perpetrators, Elton Simpson.

The allegations were made in a criminal complaint unsealed on Thursday in a U.S. District Court in Ohio.