A Lee County, TX, deputy was shot Tuesday night while serving an arrest warrant at a home in Dime Box. The deputy and a state trooper returned fire and killed the suspect.

The deputy, who has been with the Lee County Sheriff’s Office for about a decade, was taken by air to an Austin hospital for treatment and surgery, Sheriff Casey Goetz told KXAN. The deputy was in surgery for nearly four hours and the sheriff said he sustained more damage from the gunshot than first thought.

About 9:45 p.m. Tuesday, the Lee County Sheriff's Office received information that a suspect they were looking for was at a residence in Dime Box. Deputies had information that he may have been trying to go to Mexico. There was a warrant for his arrest for failure to appear on sexual assault of a child and he had a prior arrest for murder, according to the sheriff. His prior convictions include aggravated assault of a child in 1975, second-degree rape in 1976, and first-degree murder in 1981.

The deputy and a state trooper spotted the wanted man, Raul Vega Perez, and gave chase into the residence. At that time Perez opened fire on the deputy and trooper, wounding the deputy.

The deputy and trooper returned fire and exited out of the house, says Goetz. Perez was pronounced dead at 1 a.m. today. The Texas Rangers are currently investigating the case.