ENOREE, S.C. (AP) — A man was shot and killed Friday by police after he pointed a crossbow at officers investigating a possible sexual assault against his estranged wife at her South Carolina home, authorities said.

Two Spartanburg County deputies tried to get the man to drop the crossbow for about 15 minutes Friday morning, but when he pointed the weapons at other officers as they arrived at least two deputies opened fire, sheriff's office spokesman Lt. Kevin Bobo said.

"He pointed the crossbow on the deputies and we had to do our job. Unfortunately, the bad guy didn't make it. You have to pray of that family and him, but I'm thanking God our deputies were not hurt," Spartanburg County Sheriff Chuck Wright told reporters at the scene.

The incident began after a woman called 911 when her estranged husband showed up at her Enoree home intoxicated and tried to sexually assault her, Bobo said in a statement.

Deputies went to the house next door, jumping over a locked gate across the driveway, and found a man in the woods with a crossbow, Bobo said.

The man kept repeating "suicide by cop" and demanding the officers shoot him as they tried to get him to drop the crossbow, Bobo said.

None of the officers were injured, authorities said.

The names of the man and the officers haven't been released.

The State Law Enforcement Division is investigating, and agency spokesman Thom Berry said the man killed and the deputies are white.