Updated

A Minneapolis man was charged Friday with tweeting threats against FBI agents after the arrest of a friend on charges of conspiring to help the Islamic State group, and authorities allege the man had hopes himself of traveling to Syria.

Khaalid Adam Abdulkadir, 19, posted the threats on his Twitter account following the arrest Wednesday of his friend, Abdirizak Mohamed Warsame, 20, of Eagan, according to the criminal complaint. He was charged with one felony count of impeding and retaliating against a federal law enforcement officer. FBI agents arrested Abdulkadir earlier Friday.

Abdulkadir posted two separate tweets containing threats, according to court papers. One included the words "kill them FBI." The other included, "I'm kill them FEDS for take my brothers." While the tweets had been removed by Thursday morning, investigators obtained screen shots before they were deleted.

Magistrate Judge Becky Thorson ordered Abdulkadir held without bail until his next hearing Wednesday. She granted his request for a federal defender after he said his income is just $1,200 a month and he has only about $56 in the bank. He did not say where he works or in what kind of job.

Outside the courtroom, a woman who identified herself as his mother but would not give her name declined to comment on the case. She was surrounded by several young men who also refused to comment. Federal defender Shannon Elkins, who represented Abdulkadir during the brief hearing, did not immediately return a phone call seeking comment on his behalf.

"While there are many legitimate means in the United States to voice dissent and difference of opinion with our government, threatening violent retaliation against federal agents is both illegal and outrageous," U.S. Attorney Andy Luger said in a statement.

Abdulkadir has been on investigators' radar for some time, an attached affidavit from an FBI agent indicates. The affidavit alleges that Abdulkadir was in contact via Twitter's direct messaging function with a Minnesota man, Mohamed Abdullahi Hassan, also known as "Miski," who left in 2008 to join the extremist group al-Shabab in Somalia and was known for tweeting jihadist comments. The messages they exchanged in January indicated Abdulkadir was interested in getting to Syria, the affidavit says. The State Department said Monday that Hassan had turned himself in to authorities in Somalia on Nov. 6; Hassan has claimed he was captured.

In January, the affidavit says, Abdulkadir also "favorited" an old tweet posted by Hanad Mohallim, a former Minnesotan who the affidavit says was reportedly killed in November 2014 while fighting for the Islamic State group in Syria. And it says he exchanged messages via Facebook in May 2015 with Abdi Nur, a Minnesota man who traveled to Syria a year earlier to fight for the group, showing "an aspiration" by Abdulkadir to travel to Syria to be with him.

The affidavit also alleges Abdulkadir was part of a group of young men who videotaped a deputy U.S. marshal from about two feet away through a window on the ground floor of the federal courthouse in Minneapolis after the initial court appearance of one of six men arrested April 18 on charges of conspiring to provide material support to the Islamic State group.

Roughly 22 young men have left Minnesota since 2007 to join al-Shabab in Somalia; about a dozen Minnesota residents have traveled to Syria to join jihadist groups there since late 2013.

Abdulkadir's case has parallels with that of another Minnesota man, Mahamed Abukar Said, who was charged with two felonies for tweeting "ima whack that us attorney general" after the arrests of the six men in April. Said pleaded guilty to a reduced misdemeanor charge last month and faces a maximum of a year in jail plus supervised release and probation when he's sentenced later this month.