The man accused of shooting a San Marcos police officer multiple times while he was serving unrelated warrants has been charged with capital murder, according to an arrest warrant released to KVUE Wednesday.

According to court documents, officers went to 51-year-old Stewart Thomas Mettz's home at 2:23 p.m. on Valero Drive in San Marcos to serve a warrant for domestic violence Monday afternoon.

Stephen Mettz

Officials said all of the officers were wearing distinctive police uniforms with their badges clearly displayed.

When Mettz opened the door, he allegedly began firing from an "unknown caliber firearm," according to the arrest warrant.

Officer Kenneth Copeland was struck multiple times during the exchange, forcing other officers to return gunfire toward Mettz. Copeland was taken away from the scene to Central Texas Medical Center; he died a short time afterward from his injuries.

More officers were called to the area to remove Mettz and evacuate neighbors from their homes.

Eventually, Mettz exited his home without incident and was taken into police custody, although he was wounded.

While police were reading Mettz's Miranda rights and medics were administering aid, he admitted to officials that he shot a police officer two times in the chest and was also shot by a police officer at the scene. Mettz then refused to answer more questions after admitting it caused him "too much pain."

As of Thursday afternoon, Mettz remains in the hospital in good condition, hospital officials said. He is in the custody of the Hays County Sheriff's Office. He is expected to be transported to the Hays County Jail when he is released from the hospital.

Mettz's driver's license photo was released on Thursday, and his booking photo was available from the Hays County Jail on Monday:

Stewart Mettz booking photo at Hays County Jail.

This story will update as more information becomes available.

RELATED|

San Marcos mourns first officer killed in line of duty

Fallen police officer to be escorted from Austin to San Marcos funeral home

Gov. Abbott orders flags to half-staff to honor fallen San Marcos officer