Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: HSCO Photo: Jon Shapley, Staff Photographer Photo: Brett Coomer/Staff Photographer Photo: Harris County Sheriff's Office, Texas Photo: Jon Shapley, Houston Chronicle Photo: Jon Shapley, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Brett Coomer, Staff Photographer Photo: Jon Shapley, Houston Chronicle / Staff Photographer Photo: Yi-Chin Lee, Houston Chronicle / Staff Photographer Photo: Yi-Chin Lee, Houston Chronicle / Staff Photographer Photo: Yi-Chin Lee, Houston Chronicle / Staff Photographer Photo: Karen Warren, Houston Chronicle Photo: Jay R. Jordan/Houston Chronicle Photo: Jay R. Jordan/Houston Chronicle Photo: HSCO Photo: Brett Coomer, Houston Chronicle / Staff Photographer Photo: Brett Coomer, Houston Chronicle / Staff Photographer Photo: Brett Coomer, Houston Chronicle / Staff Photographer Photo: Mayra Beltran, Chronicle File Photo: HCSO Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer Photo: Elizabeth Conley, Houston Chronicle / Staff Photographer

As Harris County Deputy Sandeep Dhaliwal pulled over a silver Nissan Altima late Friday afternoon for running a stop sign, the driver turned to the woman in the front seat and said he had “tickets.”

Robert Solis, 47, had a violent past. He was convicted of two felonies in 2002 for an episode in which he shot a man and then barricaded himself in his home with his 4-year-old son, “with intent to use (him) as a shield,” according to court records.

He was sentenced to 20 years in jail for those crimes, and he served 12 years before getting out on parole in 2014. In January 2017, a warrant was issued for parole violations of assault and possession of a prohibited weapon.

That warrant was still active Friday, when Dhaliwal pulled him over for a routine traffic stop on Willancy Court near Cypress. It would have sent him back to prison.

Solis is charged with capital murder for allegedly running up and shooting Dhaliwal twice in the back of the head as the deputy returned to his patrol car. Dhaliwal was airlifted to Memorial Hermann Hospital, where he was pronounced dead.

Solis was denied a bond during his initial court hearing early Saturday. He waived his right to be at the hearing for medical reasons, officials said.

Dhaliwal was remembered Friday as a hero and a trailblazer, the agency’s first Sikh deputy and the first in the nation to win approval to wear his turban and beard on duty.

The deputy’s initial conversation with Solis appeared ordinary, according to deputies who viewed his dashboard footage.

The woman who was also in the car later told officers she was allowed to leave the scene, but Solis had to stay because had not yet been identified. The video shows Solis getting out of his car and running up behind Dhaliwal before firing the shots, authorities said. He got back in the car and drove away.

The woman told detectives that Solis called her and told her he had just shot a police officer. She didn’t believe him at first, she said.

Soon after the shooting, deputies found the car Solis had been driving empty in a Kroger’s parking lot near the scene of the shooting. Surveillance tape nearby caught him allegedly discarding the murder weapon, a .45-caliber glock, near the Bonsai Fusion Japanese Steakhouse.

A deputy found Solis walking out of the Marble Slab Creamery next to the steakhouse and attempted to identify him, according to prosecutors. He “became irate and refused to identify himself.” The deputy brought him back to the Kroger parking lot, where he was detained.