Updated

The police chief in a small Texas town just southeast of San Antonio was fatally shot Saturday while conducting a traffic stop.

Bexar County Sheriff Susan Parmerleau told KABB-TV that Elmendorf Police Chief Michael Pimentel was shot after pulling over Joshua Lopez, 24, to serve an active misdemeanor warrant for graffiti. Parmerleau told The Associated Press that Lopez shot Pimentel several times. He was struck in the shoulder and abdomen and pronounced dead at a hospital.

"I tried talking to him when he was in the ambulance for a brief moment, but he wasn't conscious," Sgt. Jason Burchett told KABB. "Today is proof it doesn’t matter if you’re a small department, you think nothing can happen. Things certainly do."

Lopez was taken into custody without incident, Parmerleau said, and was charged with capital murder for shooting a police officer.

Sheriff's spokeswoman Rosanne Hughes says investigators are looking into Lopez's background. Lopez remained in the Bexar County Adult Detention Center on Sunday. His bond was set at $1 million.

Elmendorf, located approximately 25 miles southeast of San Antonio, has a population of approximately 1,500. The town has only two paid police officers and ten reserve officers.

"It's a very small town. Everybody knows each other," Pamerleau told the AP, adding that the impact has been "devastating."

Elmendorf Mayor Evelyn Lykins said in a news release that Pimentel had served as police chief for more than a year.

"He embraced the community of Elmendorf not only as its head of law enforcement officer but also as a resident. We will miss him," the mayor said.

Steve McCraw, head of the Texas Department of Public Safety, said Pimentel is the fifth law enforcement officer to die in Texas this year. Three of the five were killed by gunfire. Thirteen officers died in the line of duty last year.

"Every day police officers throughout the state risk their lives to protect their communities, and tragically sometimes they make the ultimate sacrifice," McCraw said.

The Associated Press contributed to this report. 

Click for more from FoxSanAntonio.com.