An Illinois man has been arrested for allegedly shooting two boys outside a library in Chicago's West Garfield Park neighborhood Tuesday.

Adam Avizius, 37, is accused of wounding a 12-year-old boy and a 16-year-old boy outside the Legler Regional Library Branch of the Chicago Public Library.

The Chicago Police Department told Fox News Digital that Avizius has been charged with one felony count of aggravated battery discharge of a firearm.

Adam Avizius mugshot

Chicago Police Department told Fox News Digital that Adam Avizius has been charged with one felony count of aggravated battery discharge of a firearm. (Chicago Police Department)

It is unclear if Avizius intended to shoot the adolescents, or if their injuries were collateral damage.

ILLINOIS LOOKS TO DOUBLE DOWN ON ABORTION PROTECTIONS

Both of the minors survived the shooting.

The 16-year-old was shot twice in his leg and transported to a hospital in good condition, according to FOX 32 Chicago.

The 12-year-old was carried to the library by a security officer, who attempted to render aid. The boy was taken to a hospital soon after.

Exterior of Legler Regional Library

Avizius, who lives in suburban Brookfield, was arrested moments after the shooting outside the Chicago Public Library branch in West Garfield Park. (FOX 32 Chicago)

CHICAGO MAYOR BRANDON JOHNSON'S ALLIES PUSH FOR $12 BILLION FINANCIAL PACKAGE TO RAISE TAXES, DEFUND POLICE

Avizius, who lives in suburban Brookfield, was arrested moments after the shooting. Police detained him in the 3900 block of West Madison Street.

Police outside library shooting scene

Chicago police investigate a shooting that injured two boys in West Garfield Park. (FOX 32 Chicago)

CLICK HERE TO GET THE FOX NEWS APP

Chicago police continue to investigate the incident.