Deputy Darren H. Goforth was in uniform when he was shot in the back Friday night in what authorities described as an unprovoked killing.
The suspect, identified as Shannon J. Miles, has been in police custody since Saturday.
His criminal history includes convictions of resisting arrest, trespassing and disorderly conduct with a firearm, Harris County Sheriff Ron Hickman said.
The motive in the shooting, which Hickman described as "senseless and cowardly," is still unclear. But Goforth appears to have been targeted "because he wore a uniform," the sheriff said.
"We found no other motive or indication that it was anything other than that," said Hickman, adding that he doesn't believe the suspect and Goforth knew each other.
Hickman said "a big gun ... a handgun" was used in the shooting and ballistic tests on a weapon recovered matched the one used to kill the deputy.
Residents join search for suspect
Residents near the scene of the shooting as well as the tracking of a vehicle used by Miles helped lead investigators to the suspect.
"Our deputies returned to the streets ... to hold a delicate peace that was shattered last evening," Hickman said.
Earlier Saturday, Sgt. William Kennard of the Texas Department of Public Safety said a man "believed to be the alleged gunman" was in custody and being questioned, though he hadn't been charged.
The sheriff said surveillance video shows people drove up to the Chevron station while the shooting was happening. He asked them to come forward.
"This is the kind of thing that drives you right down to your soul," Hickman said. "It strikes at the heart of who we are as peace officers. ...This was just a cold-blooded execution."
Shot multiple times
The suspect shot Goforth, 47, while the deputy was filling up his patrol car at the gas station, Hickman said.
"Deputy Goforth was refueling his vehicle and returning to his car from inside the convenience store when, unprovoked, a man walked up behind him and literally shot him to death," he said.
He was shot multiple times from behind and then fell to the ground, where the suspect fired at him some more, said Deputy Thomas Gilliland, a spokesman for the sheriff's office.
The 10-year veteran of the Harris County Sheriff's Office died at the scene in "an unprovoked, execution-style killing," Hickman said.
"I have been in law enforcement (for) 45 years," the sheriff said. "I don't recall another incident this cold-blooded and cowardly."
Investigators say they believe Goforth was targeted because of his uniform.
The motive appears to be "absolute madness," Hickman said.
At a new conference before the arrest was announced, Hickman and Harris County District Attorney Devon Anderson talked about the nationwide debate over the relationship between the police officers and the public, with the sheriff referring to what he called "dangerous national rhetoric."
Anderson said law enforcement officials need the country's support.
"There are a few bad apples in every profession," Anderson said. "That does not mean there should be open warfare declared on law enforcement."
Hickman warned that the tension against officers is getting out of hand.
"When the rhetoric ramps up to the point where calculated, cold-blooded assassination of police officers happen, this rhetoric has gotten out of control," Hickman said. "We've heard 'Black Lives Matter,' 'All lives matter.' Well, cops' lives matter too. So why don't we just drop the qualifier, and just say 'Lives Matter,' and take that to the bank."
After announcing the arrest, Hickman said investigators were still trying to determine a motive.
"The general climate of the that kind of rhetoric can be influential on people that do thing like that," he said.
The sheriff's department posted "#BlueLivesMatter. #BlackLivesMatter. All #LivesMatter." on its Twitter page Saturday.
The gunman, who was captured on the gas station surveillance footage, drove away after the shooting in a red Ford Ranger.
Authorities said some bystanders called 911 to report the shooting.
About 30 minutes before the shooting, Goforth had investigated an accident, but Hickman said it's unclear whether there was a connection to the attack.
As far as authorities know, Hickman said, the only reason Goforth was a target "was because he was wearing a uniform."
A husband and father
Goforth leaves behind a wife and two children, ages 5 and 12.
"Our hearts go out to them," Hickman said, asking the community to remember his family in prayer.
"In times like these, it's important to ask for the prayers from this community," he said. "It strikes us in the heart to simply be a target because you wear a badge."
A Houston-based nonprofit that supports the children and spouses of officers and firefighters who die on duty, said the group will give $20,000 to Goforth's family.
Leading causes of officer deaths
The attack Friday adds to a grim tally. With that included, 23 law enforcement officers have been shot to death so far this year nationwide, according to the Officer Down Memorial Page.
Traffic incidents are the leading cause of officer fatalities in the U.S., followed by shootings.