Officials said when the deputy arrived, the suspect ambushed him and shot at the deputy multiple times.

HARRIS COUNTY, Texas — A suspect is in custody after allegedly shooting at a Pct. 4 sergeant in northwest Harris County.

Matthew Beltz is charged with aggravated assault against a peace officer.

The officer responded to a domestic disturbance call late Friday night in the 1400 block of Hatchmere Place. Officials said Beltz was hiding behind a parked car when the officer arrived.

The officer gave Beltz verbal commands to come out from behind the car, but he refused and shot toward the officer, officials said.

The officer shot back at Beltz and ran behind a tree. Authorities said the suspect came out from behind the car with two guns and continued to shoot toward the officer.

The officer’s patrol car was struck several times by bullets. The suspect eventually dropped both guns and raised his hands in the air. Authorities said he ran out of ammunition.

Beltz was then taken into custody.