(CNN) The first Sikh to become a deputy at a Houston-area sheriff's department was fatally shot in the head from behind Friday, authorities said.

Sandeep Dhaliwal, who was described as a trailblazer who paved the way for other Sikhs to join the department, was conducting a traffic stop when he was shot, Harris County Sheriff Ed Gonzalez said at a press conference.

"He wore the turban, he represented his community with integrity, respect and pride and he was respected by all," Gonzalez said.

I'm sad to share with you that we've lost one of our own. Our @HCSOTexas was unable to recover from his injuries. There are no words to convey our sadness. Please keep his family and our agency in your prayers. #HouNews

As Dhaliwal was headed back to his patrol car during the traffic stop, Gonzalez said a man got out of the vehicle with a pistol.

"In a cold-blooded manner, ambush style, (he) shot Deputy Dhaliwal from behind," Gonzalez said.

Robert Solis, 47, has been charged with capital murder in connection with Dhaliwal's murder, the sheriff's office said via Twitter on Friday night.

Robert Solis, 47, has been charged with the capital murder of Deputy Sandeep Dhaliwal. #hounews pic.twitter.com/ZGOzfEXqcc — HCSOTexas (@HCSOTexas) September 28, 2019

A weapon was recovered that deputies believe was used to kill Dhaliwal, Gonzalez said.

"It's the worst day, the worst nightmare for any police executive," Gonzalez said.

"This guy had a heart of gold, he treated his brothers and sisters in law enforcement as if they were just brothers and sisters. He thought of them before he thought of himself. He thought of the broader community before he thought of himself," said Adrian Garcia, Harris County police commissioner.

Houston Mayor Sylvester Turner tweeted a statement Friday night saying Dhaliwal "represented the diversity and inclusiveness of our community and everything that is good."

Texas Gov. Greg Abbott released a statement Friday saying "this tragic loss is a grave reminder of the risks that our law enforcement officers face every single day."

"I thank the officers who bravely responded to apprehend the suspect, and I assure you that the state of Texas is committed to bringing this killer to justice," Abbott said.

Deputy describes dashcam footage of shooting

Maj. Mike Lee with the sheriff's office described his review of Dhaliwal's dashcam to CNN affiliate KTRK-TV

The video shows Dhaliwal speaking with the driver with "no combat, no arguing," Lee said. The driver's door was open at one point as the deputy and driver were talking, Lee said.

Dhaliwal shut the driver's door, as the driver remained in the vehicle, Lee said. As Dhaliwal turned to walk back to his patrol car, the driver's side door opened and a man could be seen exiting the vehicle "almost immediately running with a gun already out," Lee said.

The dashcam captured the fatal moment Dhaliwal was shot from behind. He was shot in the back of the head, Lee said.

Our Harris County community loves their law enforcement officers. Not surprised to learn that a community-led vigil is being organized this evening to pay respects to Deputy Dhaliwal. He's an incredible loss not only to our @HCSOTexas family but to the entire community. #HouNews pic.twitter.com/V4fdgHOkmK — Ed Gonzalez (@SheriffEd_HCSO) September 28, 2019

The shooter returned to his vehicle and drove away, Lee said. A nearby resident saw the shooting and rushed to help the deputy, Lee said.

Lee told KTRK the dashcam caught an image of the shooter.

The shooter, described as a Hispanic male, was found at a business less than a mile away from where the shooting took place, Lee said. A woman, who deputies said was also in the vehicle, was also taken into custody, Lee said.

Dhaliwal's body was taken to the medical examiner's office, where KTRK said deputies lined the walkway from the van to the medical examiner's office in a show of respect and solidarity.

Dhaliwal was a trailblazer

Dhaliwal was a 10-year veteran who is survived by his wife and three children.

Gonzalez described Dhaliwal as a trailblazer multiple times.

Deputy Sandeep Dhaliwal beamed with pride when then-Sheriff @AdrianGarciaHTX announced he could wear his Sikh turbin and a beard while on duty. #hounews pic.twitter.com/BN3wnqYoCP — HCSOTexas (@HCSOTexas) September 27, 2019

In 2015, the Harris County Sheriff's Office made an official policy that allowed Dhaliwal to wear his beard and turban on duty, according to CNN affiliate KTRK-TV

"As a Sikh American, I felt the need to represent the Sikh community in law enforcement," Dhaliwal said at the time. "It will give me the chance to open up the conversation."

Prior to becoming a deputy, Garcia said Dhaliwal was an entrepreneur with a trucking business.

"When he knew that the Harris County Sheriff's Office needed someone like him to build bridges between the Sikh community and the sheriff's office because of a mishap that had happened prior.

Dhaliwal looked to his father and asked for permission," Garcia said, adding that Dhaliwal sold his business to take lower pay as a detention officer and worked his way up to be a deputy.

Because of Dhaliwal, Garcia and Gonzalez said there are other Sikh deputies now.

"There's simply no words to adequately express our heartbreak, our sadness at this time," Gonzalez said.