BEXAR COUNTY, Texas – Deputies have identified the man who they said killed a Bexar County Sheriff's Office K-9 and opened fire on authorities after leading authorities on a chase late Friday night.

Matthew Reyes Mireles, 38, is being held in lieu of $650,000 bail and is charged with interfering with a police service animal, attempted capital murder of a police officer, aggravated assault against a public servant and evading arrest with a vehicle. The charges range from third- to first-degree felonies.

Karnes County Sheriff Dwayne Villanueva said the chase started off as a routine traffic stop by Karnes City police. Mireles then led officers on a pursuit throughout Karnes County for about 30 minutes before moving on to Bexar County, Villanueva said.

Bexar County Sheriff Javier Salazar said three of his deputies and two Texas Department of Public Safety troopers then pursued Mireles, who was known to have several outstanding warrants, including one for DWI.

Salazar said Mireles fired several shots at the officers who were chasing him.

The chase ended in the area of Loop 1604 and Highway 151 with Mireles getting out of his truck and leaving it in reverse. The truck hit a Bexar County Sheriff's Office patrol car.

Salazar said Mireles then fired one shot before walking down Loop 1604 slowly.

Salazar said as Mireles walked down the highway, he fired several shots wildly at the officers. He also pointed the gun at himself, the helicopter pursuing him and passers-by, Salazar said.

Deputies then deployed K-9 Chucky, a 5-year-old Belgian Malinois, to try to subdue the man. Chucky was able to bite Mireles before Mireles fired several shots at the dog, killing him, Salazar said.

“Chucky went out doing what he was brought here to do -- to save lives,” Salazar said.

Deputies and troopers then shot at Mireles several times, and he received gunshot wounds to his lower extremities, Salazar said.

Salazar said Mireles was conscious when he was being taken to the ambulance. He was taken to University Hospital in critical condition.

Salazar said he heard several reports about the man going live on Facebook during the pursuit.

The Texas Rangers will be investigating the case further.

Salazar said the deputy who handles the K-9 was coming to terms with how he was going to tell his family that Chucky wasn’t going to come home. He said the Sheriff’s Office will be there for emotional support during this difficult time.

The sheriff said there will be a funeral for Chucky.

A procession of law enforcement vehicles escorted Chucky's body to Becker Animal Hospital early Saturday morning. The sheriff said Chucky will be buried with full honors.

In 2016, Chucky was outfitted with a bullet- and stabproof vest through a donation from Vested Interest K9s Inc. The Sheriff's Office said Saturday that Chucky's handler did not have an opportunity to put Chucky's vest on before he was deployed.

"The on-scene commander made the decision to deploy the dog to address a deadly immediate threat to the public and officers," the Sheriff's Office said in a written statement. "It does not appear the handler had an opportunity to put body armor on Chucky before the deployment.

"Preliminarily, it appears all policies and procedures were complied with. The whole incident is under routine review."

Authorities added to their statement Saturday evening, elaborating that it's not realistic for Chucky to wear his vest at all times.

"Chucky does have an issued vest, but was not able to wear it at the time," the Sheriff's Office said. "The vest is not able to be worn at all times, due to overheating concerns and physical fatigue on the dog. It is intended to be placed on the dog in the event of a pre-planned operation.

"This was not a pre-planned event, due to the deadly actions of the suspect placing the general public and officers on scene in danger of imminent death or serious bodily injury.

"The K-9 handler who was actively engaged in pursuing the armed suspect did not have an opportunity to place the vest on Chucky as doing so would have continued to place the public in imminent danger. Immediate actions had to be taken to ensure the suspect was stopped quickly.”