Sandeep Dhaliwal was a 10-year veteran on the force, and the agency's first Sikh deputy.

An Indian-American Sikh police officer died after being shot multiple times from behind in a "ruthless, cold-blooded way" during a traffic stop in the US state of Texas, a senior official said Saturday.

Sandeep Singh Dhaliwal, Sikh Harris County Sheriff's deputy, was shot while conducting a traffic stop, Sheriff Ed Gonzalez said. He was in his early 40s.

Ed Gonzalez said Sandeep Dhaliwal, a 10-year veteran of the department, stopped a vehicle with a man and woman inside and one of them got out and shot him "ambush-style" at least twice in a "ruthless, cold-blooded way."

The shooter was seen running to a shopping centre nearby, officials said.

Investigators were able to identify what the shooter looked like by watching Sandeep Dhaliwal's dashcam video.

"They immediately looked at his dashcam to see what the suspect looked like, they took a photo of the suspect on the scene with their phone and immediately got that out to our intel people," Ed Gonzalez said.

The vehicle the shooter was driving was found and is being investigated, officials said.

The gunman and the woman were taken into custody, they said.

Sandeep Dhaliwal was married and a father of three children.

"Deputy Sandeep Dhaliwal was a trailblazer. He was an example for many. He represented his community with respect and pride," said Commissioner Adrian Garcia.

"Deputy Dhaliwal is known to everybody as someone with a giving heart," Gonzalez said. "Post (Hurricane) Harvey, when we needed the help most, he brought an 18-wheeler of people that he gathered together, that came all the way from California to deliver goods to our community."

Since 2015, Sandeep Dhaliwal was the "history-making" police officer in Texas to serve while keeping his Sikh articles of faith, including a turban and beard. He was allowed to wear the turban and beard while patrolling the streets in order to bolster cultural diversity.

With this policy, one of the largest sheriff''s offices in the country had affirmed that a person does not have to choose between their faith and a career of service. Since 9/11, misperceptions about Sikhs'' religiously mandated turbans and beards have led to an increase in discrimination against the community.

Policy changes like that at the Harris County Sheriff Office and other law enforcement agencies across the country aim to combat this stigma while also giving qualified men and women a chance to serve the community.

Sandeep Dhaliwal worked with United Sikhs, a global humanitarian relief and advocacy nonprofit, to help organize the donation of truckloads of supplies for first responders after Harvey.