CEDAR PARK, Texas (KXAN) – A person is in police custody after refusing to come out of an apartment in Cedar Park for hours.

The Cedar Park Police Department alerted people on social media Friday morning to stay clear of the area near the 1400 block of Main Street due to police activity.

That’s close to Costco and just west of 183A and Whitestone Boulevard.

Police posted at 5:51 a.m. that they were responding to a call about a “barricaded suspect.” Police said in an update at 7:02 a.m. the suspect was in custody.

In a press release, CPPD said the incident started around 12:25 a.m. at an apartment complex on Main Street when a call came in about domestic violence.

Police said a woman called and said she had been physically assaulted and threatened with a firearm.

According to CPPD, the suspect had left before officers arrived, then after police evacuated the victim to safety, the suspect returned and threatened officers, then shut himself in the apartment and kept making threats toward officers.

Central Texas Regional SWAT was called to the scene, and police said crisis negotiators attempted to resolve the situation for several hours, but the suspect refused to cooperate, according to CPPD.

Gas was eventually deployed inside the residence and the suspect came out of the apartment, where he was taken into custody without further incident, police said. Neither the suspect or officers were injured during this situation.

The Cedar Park Police Department identified the suspect as Ashton Carter, 32.

CPPD said Carter was arrested and charged with Aggravated Assault with a Deadly Weapon and transported to the Williamson County Jail.