LOVELAND, Colo. (AP) — Authorities say a man who died after being contacted a police officer in northern Colorado on Saturday night killed himself.

The Loveland Reporter-Herald reported Wednesday that the Larimer County Coroner's Office concluded that 40-year-old David Matthew Harper died of a self-inflicted gunshot wound to the head and classified his death as a suicide.

The shooting happened after Harper was involved in a rollover crash.

The Larimer County Sheriff's Office said that Harper was holding a pistol when a Loveland police officer responded to the crash. It said Harper refused to drop the gun and fired at the officer prompting the officer to fire back several times.

The shooting is being investigated by a team of nearby law enforcement agencies.