SIMPSONVILLE, S.C. (AP) — A deputy in South Carolina fatally shot a man who came out from a building with a woman and a gun and said he was holding her hostage, authorities said.

Greenville County deputies came to a home near Simpsonville around 4:45 p.m. Monday to check on an alarm call and found a man standing outside a building in the home's backyard, sheriff's Sgt. Ryan Flood said.

"The deputies challenged him. The man then ran back inside that building and yelled that he had a hostage," Flood said at a news conference Monday evening.

The man was shot and killed by at least one officer when he came back out of the building holding a gun with a woman beside him, Flood said.

James Michael Chappell, 32, died at the scene from a gunshot wound to the head, the Greenville County Coroner's Office said.

The woman and the officers were not hurt, Flood said.

Flood would not say if there were any attempts to negotiate with Chappell.

"(Deputies) did challenge him," Flood said. "As far as how long that took place, it is under investigation."

Chappell and the deputy who shot him were white.

The State Law Enforcement Division is investigating as is standard in most shootings involving police officers in South Carolina.