By WCCO-TV Staff

MINNEAPOLIS (WCCO) — A 32-year-old man is accused of firing a gun at officers during a daytime standoff earlier this week in Oakdale.

Shawn Codinak is charged with three counts of first-degree assault/using a deadly weapon against an officer, court documents filed in Washington County show. Officers fired back at Codinak, but didn’t hit him.

READ MORE: Twin Cities Ranked Among Top 30 Best Places In United States For Halloween

Codinak is currently in custody. After being arrested Monday, he was booked into a hospital on a medical hold.

According to a criminal complaint, officers responded to Codinak’s Oakdale apartment after he allegedly fired a gun. The shooting happened near a high school, which went into lockdown as classes were still in session.

Officers found Codinak hanging out of the window, retreating back inside and returning back to the window. Codinak allegedly told a sergeant that he wanted to meet God.

When officers tried to talk with Codinak, he began throwing items out the window, including a shotgun, which is believed to be the weapon he initially fired.

At one point during the negotiations, Codinak approached the window and fired a handgun in the direction of three officers, the complaint states. The officers returned fire, but no bullets hit Codinak. He eventually surrendered.

READ MORE: Bicyclist Dies After Being Hit By Vehicle In Rosemount

In a search of Codinak’s apartment, investigators found numerous firearms, five knives and a bow and arrow.

If convicted of the assault charges, Codinak faces a maximum penalty of 20 years in prison on each count.

The Minnesota Bureau of Criminal Apprehension is investigating the standoff, as officers fired their weapons.

Officials identified the officers involved as Washington County sheriff’s deputy Randy Helms, Woodbury police Sgt. Omar Maklad, and Oakdale police officer Kevin Merkling. Another Woodbury officer, Robert Boleen, fired a less lethal weapon.

The BCA says portions of the standoff were captured by body cameras, squad cameras and drones.

MORE NEWS: Justice Department: $736K Will Go To Victims Of Alleged Mpls. Landlord Sexual Harassment