A man who police say shot himself while handcuffed in the back of a locked police car in Austin, Texas, died Monday from his injuries.

Zachary Anam, 19, was arrested Sunday for shoplifting and possession of a controlled substance at Barton Creek Square, a local shopping complex, the Austin American-Statesman reported. The arresting officer was transporting Anam to police headquarters for fingerprinting when Anam began expressing suicidal thoughts. Police said when the arresting officer asked Anam if he was armed, he replied “yes,” before withdrawing a gun from his waistband and putting it to his head, KVUE in Austin reported.

The officer pulled the cruiser over and after a six-minute standoff, Anam shot himself in the head. He succumbed to his injuries at University Medical Center Monday, a family spokesman told the Statesman.

“If this individual had chosen to remove that weapon and fire at the officer instead of saying something, we could be here discussing a very different incident,” Austin’s interim police Chief Brian Manley told local news station KXAN.

Police did not detect the gun Anam used to end his life because the arresting officer, an 11-year veteran of the force, did not search him, both KVUE and the Statesman confirmed with Austin police. Anam had already been cuffed by a Macy’s employee.

The incident was captured by the dashboard camera of the police vehicle following behind the cruiser that carried Anam, police said. Austin police issued a warrant for Anam’s arrest in May 2016, after police say he burglarized and stole vehicles with three other suspects over the course of several months.

Anam is not the first suspect who managed to shoot himself in the head while handcuffed in the back of a police car. In 2012, Chavis Carter, 21, shot himself while in police custody with a gun police missed during two different searches of his person. Carter had been arrested by the Jonesboro, Arkansas, police who found $10 worth of marijuana on him. Carter’s hands were cuffed behind his back. The Arkansas State Crime Lab ruled Carter’s death a suicide.