GODDARD, Kan. (AP) — A Goddard police officer shot and killed a man after he refused numerous orders to drop a weapon and began walking toward the officer with a weapon that was later determined to be a replica BB gun, authorities said.

Sedgwick County Sheriff Jeff Easter said 39-year-old Michael James Trask, of Lake Afton, died in the shooting near Goddard on Tuesday.

Easter said the officer tried to stop Trask for a traffic violation and a short pursuit began. After the vehicle eventually stopped, the officer advised dispatchers that the driver had flashed a weapon at him, Easter said.

The officer commanded the man a total of 15 times to drop his weapon but Trask did not comply. Easter said Trask was walking toward the officer with the weapon when the officer fired eight times.

Trask died at the scene.

After the shooting, a woman saying she was Trask's wife called dispatchers and said her husband was suicidal and armed with a loaded .40 caliber handgun, Easter said.

Easter said the handgun was a replica BB gun.

The officer involved in the shooting has been placed on administrative pending an investigation.