The man shot himself as officers ordered him to exit his car, a police spokesman says.

HOUSTON — A man who fired gunshots at a home later shot and killed himself as he was confronted by officers, according to the Houston Police Department.

Police spokesman John Cannon said officers were called to the 6300 block of French Chateau at about 11 p.m. Tuesday. The man's roommate said the suspect was acting erratically and had fired multiple gunshots into their home.

Police arrived and ordered the shooter to show his hands and exit his vehicle. That’s when the man shot himself in the head.

The suspect, 30, was taken by ambulance to Ben Taub General Hospital in critical condition. He was later pronounced dead.

There were no injuries reported inside the home where the shots were fired.

Police are treating the incident as an in-custody death and say it will be investigated by HPD Homicide and Internal Affairs Division.

Police have not released the man's name.