A Minnesota man was charged Friday with threatening FBI agents on social media after the arrest of a friend on charges of conspiring to help ISIS, and authorities say the man had hopes himself of traveling to Syria.

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

Abdulkadir, of Minneapolis, wrote messages that included the words “kill them FBI” and “I’m kill them FEDS for take my brothers,” according to court documents. Investigators were able to take screen shots of the tweets before they were eventually deleted.

Abdulkadir is being held without bail until his next hearing on Wednesday. Judge Becky Thorson granted his request for a federal defender after he said his income is just $1,200 a month and only has about $56 in the bank. It was unclear what his job was.

"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.

The 19-year-old has been on authorities’ radar, according to an affidavit from an FBI agent. The document claims Abdulkadir was in contact via Twitter with a Minnesota man, Mohamed Abdullahi Hassan, also known as “Miski,” who left in 2008 to join the extremist group Al-Shabaab 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 "liked" an old tweet posted by Hanad Mohallim, a former Minnesotan who the affidavit says was reportedly killed in November 2014 while fighting for ISIS 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.

Roughly 22 young men have left Minnesota since 2007 to join Al-Shabaab 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.

The Associated Press contributed to this report.