LONGMONT, Colo. (KDVR) — A 30-year-old man has been arrested after he allegedly assaulted a former roommate and threatened to kill police officers on Saturday.

According to the Longmont Department of Public Safety, police officers were called to do a welfare check in the 1600 block of Flemming Drive for a man who was covered in blood and asking for help.

The area is northeast of Raber Park in Longmont.

Once officers arrived in the neighborhood, LDPS said that officers learned the man had been assaulted by a former roommate who was prohibited from being near the residence due to a restraining order.

According to police, the suspect was identified as 30-year-old Ian Hanuman.

Hanuman was barricading himself inside the victim’s residence and refusing to exit. According to police, he barricaded the door, armed himself with a stun gun and threatened to kill officers if they approached him.

A shelter-in-place was issued to nearby residences as a precaution.

Due to the circumstances, Longmont Police SWAT was called to help officers. More than five hours later, police said Hanuman was taken into custody at around 2 a.m.

Hanuman was transported to the local jail and booked on three outstanding warrants as well as first-degree assault and violation of a protection order.

According to police, the victim suffered serious injuries but was released from the hospital.