Chat with us in Facebook Messenger. Find out what's happening in the world as it unfolds.

Authorities say Farhan Sheikh, 19, posted this threat in an online post. CNN obscured parts of the post to remove an obscenity and identifying information about the clinic.

(CNN)A Chicago man has been accused of threatening to kill people at a women's reproductive health clinic, federal prosecutors said.

Farhan Sheikh, 19, allegedly posted the threat this month on iFunny, a social media platform where users can post internet memes, according to a criminal complaint.

He was arrested Friday and charged with transmitting a threat in interstate commerce, federal prosecutors said.

US Magistrate Judge Susan E. Cox said at a hearing on Tuesday that Sheikh will be "detained as a danger to the community."

Cox said Sheikh is "inherently and deeply unstable."

Read More

Sheikh's public defender declined to comment after the hearing. Sheikh faces up to five years if convicted.

Around August 13, the FBI learned that a user on iFunny had posted a threat, according to court papers. In the post, Sheikh allegedly wrote: "I am done with my state and thier (sic) bullsh*t abortion laws and allowing innocrnt (sic) kids to be slaughtered for the so called 'womans (sic) right,'" according to an FBI affidavit.

Sheikh wrote that he planned to go to the clinic, which was about 4 miles from his home, on August 23 and "proceed to slaughter and murder any doctor, patient or visitor," an affidavit said. He also posted that his account was "NOT a satirical account. I post what I mean, and i WILL carry out what I post," court papers said.

On August 13th, FBI agents searched his home. Sheikh told FBI agents he thought they had come because of a "joke" he posted on iFunny, court papers said.

Sheikh referenced the arrest of Justin Olsen, an 18-year-old Ohio man who was charged this month with threatening to assault a federal law enforcement officer, a criminal complaint said.

Olsen posted a threat to assault federal law enforcement investigators and discussed the 1993 Waco siege on iFunny in June, an affidavit said. Olsen also blamed the Bureau of Alcohol, Tobacco, Firearms and Explosives for the deaths of scores of people living at the Branch Davidian complex, court papers said.

Olsen was ordered held after a court appearance last week. His lawyer could not be reached Monday evening.