A standoff on Madison's near East Side ended peacefully Thursday night.

Police identified the man involved in the standoff as 38-year-old Christopher L. Hayden.

Madison police say they responded to the 100 block of South Marquette Street after Hayden threatened a neighbor with a gun. Police arrived shortly before 3:00 p.m.

Police say witnesses told them Hayden was inside a home.Madison Police's SWAT team and other law enforcement created a perimeter and asked people to avoid the area.

Those living nearby wondered what was happening as they returned home from work.

"Kind of wondering what the hell is going on," said Kurt Mullis. " We had a big fire a few houses down not too long ago, so it's not the first time the street's been a little crazy."

Officers called out numerous times to get the man to come out peacefully. After a couple hours, police say they heard from Hayden. They later delivered a cell phone and cigarettes to the front door because his cell phone was not working.

"This is a person who is not on our radar in any way," said Capt. Tom Snyder. "It's kind of one of those random things that happened in the neighborhood and our goal is to keep people safe."

Snyder said Hayden was somewhat threatening towards law enforcement during the standoff. Snyder described Hayden as agitated and clearly in an emotional state.

"He was having some personal issues over the last couple of days and seemed to have spiraled into a very depressed, agitated state," said Snyder. "I think it was just a coincidence the neighbors stumbled into him today, and he was already angry when they arrived."

Around 9:45 p.m. Hayden exited the home peacefully and was taken into police custody.

Snyder said one of the measures they used to deescalate the situation involved playing audio recordings on a speaker from a former family member and a friend. He says after playing those he agreed to speak to police.

"I think he just needed to talk to someone and he just needed to work it out and vent a little bit and then he was willing to do the right thing."

Hayden was taken to the veterans' hospital for assessment. Police searched the home to see if any weapons were inside.

Goodman Community Center was placed on lockdown during the standoff.