(CNN) -- Investigators arrested a suspect but were still searching for a motive Wednesday after a West Virginia sheriff known for his tough stance on drug dealers was shot dead in his patrol vehicle.
Mingo County Sheriff Walter E. "Eugene" Crum was eating lunch just blocks away from a courthouse when he was gunned down, officials said.
Tennis Melvin Maynard, 37, is accused in the killing, West Virginia State Police First Sgt. Michael Baylous said.
The suspect parked his car close to the sheriff's SUV and shot through the window twice, hitting the sheriff twice in the head, according to a state official who was briefed on the investigation.
After a brief chase, Maynard was shot by a sheriff's deputy in Delbarton, West Virginia, after he wrecked the vehicle he was driving and raised his weapon, West Virginia State Police Capt. Dave Nelson told reporters.
Maynard remained hospitalized Wednesday night after undergoing surgery to treat multiple gunshot wounds, Baylous said.
Investigators were still trying to identify a possible motive. On the way to the hospital, Maynard spoke with police, but Baylous didn't specify what he said. Authorities were hoping to speak more with Maynard now that he's out of surgery.
"He said some things to us, and we're still trying to make sense of it," Baylous said. "It could be interpreted in different ways."
At a news conference Wednesday, officials said Crum had taken office as sheriff in January and quickly earned respect from many in the community.
"He and his deputies and other law enforcement agencies have worked tirelessly to wipe out crime in our county, especially targeting the drug dealers who spread the disease of addiction among our residents," said John Mark Hubbard, president of the Mingo County Commission.
"Pray for the residents of Mingo County as we struggle to understand why someone who fought so freely and selflessly on behalf of all of us was taken so tragically," he said.
Crum also served as a county magistrate and a special investigator for the prosecutor's office, Hubbard said.
The sheriff's slaying shook the rural county, which normally sees only one or two slayings per year, said Lt. Randy Hatfield of the Mingo County Sheriff's Office.
"It's devastating," Hatfield said. "It's a big blow to the community."
The Williamson Daily News reported that Crum was in his vehicle in downtown Williamson when a man drove into the parking lot, approached Crum's sport-utility vehicle and shot him point-blank.
A witness saw the shooting, called 911, and gave police a vehicle tag number that led them to the suspect, Hatfield said.
Investigators believe a handgun was used.
Asked whether officials thought there was any connection between Crum's slaying and the recent killings of a Colorado prison official or the slayings of two Texas prosecutors, Hatfield said, "I hope not," but declined to elaborate further.
Crum was married and had children and grandchildren.
Gov. Earl Ray Tomblin issued a statement, saying in part, "Our thoughts and prayers are with the Crum family."