CEDAR PARK, Texas (KXAN) — In a press conference just after 5 p.m. Sunday, Cedar Park Police Chief Mike Harmon said that officers took a man into custody after a 12 and a half hour long standoff with the Central Texas Regional SWAT Team.

Harmon said that law enforcement initially received a 911 call around 4:30 a.m. for a mental health incident in the 400 block of Marigold Lane.

The man’s wife was able to leave the home, and told law enforcement that there were weapons in the home. The SWAT team and crisis negotiators were then called to the scene, Harmon said.

During the standoff, law enforcement received reports that said the man had injured himself. Officials then decided to use a robot to approach the residence in order to check on the man. Harmon said that in response, the man fired two “warning shots” inside the home.

After the shots were fired, law enforcement deployed gas into the home. The man surrendered to law enforcement peacefully, Harmon said.

“This is the best possible outcome for this situation,” Harmon said. “Hopefully we can get him the resources that he needs moving forward.”

No members of law enforcement were injured in the standoff and the robot was undamaged. The man did have injuries when he was taken into custody, which Harmon says were self-inflicted.