NASHVILLE, Ill. (WTVO) — An Illinois police officer was stabbed while performing a routine wellness check Tuesday night.

It happened around 10 p.m. at an apartment complex on Nashville’s Hoffman Street, according to WSIL.

The stabbing occurred when police were taking a 29-year-old man into protective custody after a mental health crisis. The man reportedly grabbed a pocketknife and stabbed the officer in the throat area while they were gathering personal items.

The officer was taken to a local hospital for treatment.

A standoff took place after the man barricaded himself in the bathroom, lasting until 4 a.m. Wednesday. The man was taken into custody after its conclusion.