Joshua M. Osborn, 41, of Crystal Lake.

A Crystal Lake man was arrested after he allegedly fired a rifle, striking a residence in Crystal Lake where a baby and two people were inside Friday afternoon.

Joshua M. Osborn, 41, of Crystal Lake, was charged with one count of reckless discharge of a firearm, a Class 4 felony.

A criminal complaint filed in McHenry County Circuit Court said Osborn was at his residence in the 200 block of Pomeroy Avenue in Crystal Lake around 3:49 p.m. Friday.

The complaint said Osborn discharged a rifle while acting in a reckless manner, endangering the safety of others.

A rifle round penetrated a home across the street from Osborn’s residence.

Three people, including a 9-month-old child, were inside the home that was struck by gunfire, the complaint said.

The Crystal Lake Police Department arrested Osborn and he was transported to the McHenry County Jail.

[Suggested Article]  19-year-old man found alive but critically injured nearly 16 hours after motorcycle crash in Grayslake

The McHenry County State’s Attorney’s Office did not file a petition to detain Osborn pending trial, court records show.

McHenry County Judge Joel Berg released Osborn from custody and ordered him to surrender his firearms to the police within 24 hours of release.

Osborn was also ordered not to possess weapons and to have no contact with the victim’s residence.

Osborn will be on pre-trial supervision monitoring and be subject to random testing for alcohol.

He is scheduled to appear in court again on July 24 for a status of preliminary hearing.