HOUSTON -- Police say a 36-year-old man was killed at a gun range near Houston after a rifle was accidentally discharged Tuesday morning.

Police say someone was working on the gun inside a building on the property in Cypress. When it fired, the bullet went through a wall and struck a man who had just gotten out of his car.

A helicopter took the man to a local hospital where he was pronounced dead.

Police say homicide detectives are questioning range employees and are trying to determine if the shooting was the result of a gun malfunction or human error.