Ulises X. Stegg, 19, of Harvard, (inset) was arrested Saturday evening after police found him in possession of a loaded pistol in his waistband at the Milk Days Festival in Harvard. | Background Photo: Milk Days Festival; Inset: Provided

A 19-year-old man was taken into custody after officers found him illegally possessing a loaded handgun at the popular Milk Days festival in downtown Harvard.

Ulises X. Stegg, 19, of Harvard, was charged with aggravated unlawful possession of a weapon, a Class 4 felony, and unlawful possession of a firearm ineligible for a FOID, a Class 3 felony.

A criminal complaint filed in McHenry County Circuit Court alleges Stegg illegally possessed a Glock 36 handgun around 10:07 p.m. Saturday in Harvard.

The complaint said Stegg does not have a valid Firearm Owner’s Identification card as he is not eligible for one.

The complaint also said that Stegg was caught with the gun concealed in his waistband.

Court documents said Stegg was carrying the pistol at the Milk Days Festival in Harvard where hundreds of people were present.

The gun had a fully loaded magazine inserted and a round chambered in the pistol.

[Suggested Article]  Probation for suspect who pulled out loaded gun in Zion restaurant, struggled with officers who tried disarming him

Stegg was transported to the McHenry County Jail and the McHenry County State’s Attorney’s Office filed a petition to detain him pending trial.

McHenry County Judge Cynthia Lamb granted the petition after agreeing with prosecutors that Stegg poses a real and present threat to the community.

Lamb said that Stegg knew he should not have possessed a firearm but did so while concealing it while at a public event.

“There is no GPS to protect the entire community, and no conditions to mitigate the real and present threat this defendant poses to the community,” the judge said.

Harvard Milk Days is an annual festival in Harvard that features family-friendly events, games, rides and food.

The event was held June 6-8 this year in downtown Harvard, which was the 84th time the festival was held.

[Suggested Article]  17 years in prison for alleged Mexican drug cartel carrier caught with almost $2M worth of fentanyl pills in McHenry County

Stegg is scheduled to appear in court again on Friday morning for a status of preliminary hearing.