AUSTIN (KVUE)- A man shot himself in the head while in police custody after he was arrested for allegedly shoplifting at the Barton Creek Mall Sunday afternoon.

APD said they responded to the shopping center at noon. They arrested a man, who officers said might be in his late teens or early 20s.

While authorities were trying to identify the man, they found out that he might have outstanding felony warrants. From that point, police said they placed him under arrest and were planning to take him to the downtown police station to identify him through fingerprinting.

However, during the car ride, police said the man began discussing suicidal thoughts with the arresting officer near the 500 block of Lavaca Street. When the officer asked the man if he was armed, the man replied, "yes". He then pulled a gun from his waistband while handcuffed, and held the gun to his head.

The arresting officer said he called for backup after he found out the man was armed and could be a danger to himself, as well as patrons at a nearby bar.

Six minutes passed before the man pulled the trigger and shot himself in the head, police said.

Medics were called to the scene, and the man was taken to University Medical Center at Brackenridge with life-threatening injuries.

Police said the arresting officer is an 11-year veteran and that it's routine procedure for them to search a suspect before putting them in a police car. Police Chief Brian Manley said they are working to figure out how the gun was not found.

APD also added that the entire incident was captured on the camera located inside the car.

This is a developing news story. KVUE will update this story when more information becomes available.

(© 2017 KVUE)