A five-hour standoff in Taylorsville between police and a barricaded and possibly armed man ended peacefully when the man surrendered to authorities.

SWAT team members had surrounded a Taylorsville apartment, near 4100 South and 1300 West, since about 5 a.m. Thirty-one other units in the apartment complex were evacuated during the standoff.

The incident began about 1 a.m. when the man arrived home at his apartment where his wife was at, and began making threats against himself, said Taylorsville police detective Troy Martinez.

The man's wife left the residence. She was never held against her will, Martinez said.

The SWAT team was called about 5 a.m. The wife confirmed to investigators that she saw her husband holding a gun and that he had weapons inside the house. After some on-going negotiations on the phone with the man, he surrendered about 10:15 a.m., Martinez said.

The man was taken to a local hospital for a psychological evaluation, he said.