Daniel B. Pederson, 42, Chicago, (inset) was arrested on Thursday after he allegedly made a shooting threat earlier this month toward the Lake County Courthouse in Waukegan. | Background Photo: Google Street View; Inset: Provided

A Chicago man has been taken into custody after authorities say he threatened a “military precision” mass shooting at the Lake County Courthouse in Waukegan.

The Lake County Sheriff’s Office became aware on June 14 that a man on Chicago’s Riverwalk passed a note to a security guard working at a restaurant on the Riverwalk.

The note indicated there would be a mass shooting with military precision at the Lake County courthouse, according to Lake County Sheriff’s Office Deputy Chief Christopher Covelli.

The note also made threatening remarks directed at a Lake County judge and a Chicago police officer assigned as a task force officer to the FBI, Covelli said.

Lake County Assistant State’s Attorney Lindsay Hicks said the note mentioned Courtroom 103, which is the courtroom of Lake County Judge Michael Nerheim.

Nerheim is the judge who handled a family case involving Pederson, Hicks said.

[Suggested Article]  Small chlorine leak detected in Round Lake Beach

Pederson previously threatened the judge when he was the state’s attorney, Hicks said.

The Lake County Sheriff’s Office Criminal Investigations Division launched an investigation.

The man returned to the Riverwalk on Thursday and was spotted by the security guard he previously passed the note to, Covelli said.

The security guard contacted the Chicago Police Department and the FBI. The man was located and taken into custody.

Covelli said he was identified as Daniel B. Pederson, 42, Chicago.

Lake County sheriff’s detectives worked with the Lake County State’s Attorney’s Office and obtained an arrest warrant for Pederson for one count of threatening a public official, a Class 3 felony.

Members of the Sheriff’s Warrants Team took custody of Pederson in Chicago on Friday.

He was transported to the Lake County Jail where he appeared for a First Appearance Court hearing Saturday morning.

[Suggested Article]  Man upset over text messages allegedly attacked, seriously injured elderly man in Woodstock

Pederson began swearing at Lake County Judge Stacey Seneczko after he was brought into the courtroom, which led to deputies promptly escorting him out of the courtroom and back to the jail.

The state’s attorney’s office filed a petition to detain Pederson Friday morning. Additional charges are possible.

Seneczko ordered Pederson held until a detention hearing, which she scheduled for Tuesday afternoon.

Seneczko said an out-of-county judge may be assigned to the case.

In 2014, Pederson was arrested for calling a state agency and saying he was going to kill people and light up the Lake County Courthouse and Gurnee Police Department.