Joel A. Koskinen, 35, of Barrington Hills, is facing felony charges after allegedly posting videos on YouTube making threats toward the Barrington Hills Police Department. | Left: Screengrab; Right: Provided

A man has been arrested after he allegedly posted rambling videos on YouTube threatening to torture and kill police officers with the Barrington Hills Police Department.

Joel A. Koskinen, 35, of Barrington Hills, was charged with threatening a public official, a Class 3 felony, and electronic harassment, a Class 4 felony.

A criminal complaint filed in McHenry County Circuit Court alleges Koskinen conveyed a threatening YouTube video directly to a specific police officer with the Barrington Hills Police Department.

The video contained a threat to shoot the officer in the head and the threat was “made because of the hostility of the defendant toward” that officer, the complaint said.

The complaint said the video made reference to, “I will now kill every cop in Barrington Hills Police.”

“Barrington Hills police, they will be killed immediately. They will never come here again and they will die regardless,” Koskinen said in one of the videos while referencing shooting and torturing the police.

In another video, Koskinen mentioned that a police officer had been at his house but “that cop will be shot in the head.”

[Suggested Article]  Barrington Hills police arrest Tesla driver who claimed they were sleeping with car in autopilot when it struck squad car

“Now he’s going to die for having been here ever before. There will never be a cop in this house again,” Koskinen said in the video. “By the way, they’re going to cut your legs off.”

The Barrington Hills Police Department obtained an arrest warrant for Koskinen on Tuesday.

Officers arrested Koskinen on Wednesday morning and transported him to the McHenry County Jail.

Koskinen is scheduled to appear for an Initial Appearance Court hearing on Thursday afternoon.