A Texas deputy who drew national headlines when he was allowed to grow a beard and wear a turban on the job to observe his Sikh faith was fatally shot Friday in an "ambush-style" attack.

There was no evidence the shooting of Deputy Sandeep Dhaliwal during a 1 p.m. traffic stop, in an area where the city of Houston meets unincorporated Harris County, was a hate crime.

"He was on a traffic stop," Harris County Sheriff Ed Gonzalez said at a news conference. "The preliminary information that we have at this time is that a male suspect exited the vehicle armed with a pistol and, in a cold-blooded murder, ambush-style shot Deputy Dhaliwal from behind."

The sheriff said Dhaliwal, 41, was taken by helicopter to a hospital but died.

From left, Deputy Sandeep Singh Dhaliwal with Sheriff Adrian Garcia of the Harris County Sheriff's Office in Texas. Harris County Sheriff's Office

The sheriff's office tweeted Friday night that Robert Solis, 47, was arrested on suspicion of capital murder in connection with the shooting.

NBC News affiliate KPRC in Houston reported that the suspect fled to a nearby shopping center then hid in a store before being taken into custody. A woman in the vehicle was also detained, the station reported.

"There's simply no words to adequately express our heartbreak, our sadness at this time," Gonzalez said. "Deputy Sandeep Dhaliwal a 10-year veteran, was a hero, was a respected member of the community, and he was a trailblazer."

In 2015, Dhaliwal drew attention when the Harris County department became the nation's largest sheriff's office to allow a Sikh to work the beat with his articles of faith, including turban and beard.

The deputy drew praise from Gonzalez for going to Puerto Rico after the island was devastated by Hurricane Maria in 2017.

From right-left, Deputy Sandeep Singh Dhaliwal with family and Sheriff Adrian Garcia. Harris County Sheriff's Office

He also worked that year with humanitarian relief nonprofit United Sikhs to get truckloads of supplies to first responders after Hurricane Harvey struck the Texas and Louisiana coasts and caused flooding in Houston, according to the sheriff's office.

"Deputy Dhaliwal is known to everybody as somebody with a giving heart," Gonzalez said.

He is survived by three children, a wife and a brother, the sheriff said.