TUSCALOOSA, Ala. — A police standoff with a suicidal man that put an Alabama hospital on partial lockdown for several hours has ended peacefully.

Tuscaloosa Police Chief Steven D. Anderson said the man surrendered Wednesday evening after several hours of negotiations with police. Anderson said the man was taken to a nearby mental health facility.

The man, after leading police on a car chase, sat in his vehicle with a gun to his head outside the emergency room of DCH Regional Medical Center. Police had pursued the man after his girlfriend called saying he had threatened to kill her.

Police presence was heavy outside the hospital in the standoff that lasted for more than four hours.

Anderson said the man was known to have “mental health issues.”