MINNEAPOLIS (WCCO) — A federal magistrate has ordered a Minneapolis man accused of threatening to kill FBI agents and a federal judge held in jail as he awaits the outcome of his case.

The alleged threats were posted on 19-year-old Khaalid Abdulkadir’s Twitter account on Dec. 9 after his friend, Abdirizak Warsame, was arrested on charges of trying to join ISIS.

READ MORE: Stabbing In Dodge Center Leaves 1 With Serious Injuries

Magistrate Franklin Noel made it clear on Monday that in addition to the threats he was concerned by evidence that the teenager had been in communication with two other Minnesota men who left to join terror groups overseas.

Investigators say that the threat to kill FBI agents and a judge were posted by Abdulkadir hours after Warsame appeared in federal court.

Warsame is the 10th young Minnesotan accused in the last year of trying to join ISIS.

One of the threats reads, in part, “kill them FBI and [expletive] judge.”

In court on Monday, friends and family of Abdulkadir listened as his mother, brother and uncle testified that the teen, who spoke at his May 2015 high school graduation and was attending college at Minneapolis Community and Technical College, is not an ISIS supporter.

But prosecutors pointed to a series of communications between Abdulkadir and two notorious federal terror fugitives.

READ MORE: Teenage Daughter Charged With Attempted Murder After Allegedly Shooting Mother Over Meth In Northern Minn.

In January of 2015, prosecutors say Abdulkadir exchanged 30 direct messages with Mohammed Abdullahi Hassan, who is also known as Mujahid Miski.

Miski left Minnesota in 2009 and has been indicted for joining al-Shabaab in Somalia.

Prosecutors say that in the messages with Miski, Abdulkadir expressed a desire to travel to Syria to join ISIS. And in May of 2015, Abdulkadir reached out on Facebook to Abdi Nur, who left Minneapolis in 2014 to fight for ISIS in Syria and has also been indicted.

Defense attorneys demanded to see the actual communications with Miski and Nur, saying they have only seen the quotes from the criminal complaint.

It was the alleged communications with Mujahid, Miski and Nur that clearly sealed the magistrate’s decision to keep Abdulkadir in jail.

Both Nur and Miski are credited with helping recruit not only dozens of young Minnesotans, but countless others from the U.S. and the world to join al-Shabaab and ISIS.

MORE NEWS: Driver Hits Man During Cloquet Road Rage Incident, Police Say

In the past few months, Miski is widely believed to have surrendered to authorities in Somalia. And there has been widespread speculation that Nur may have died fighting in Syria.

Esme Murphy