A South Carolina sheriff’s deputy responding to a report of a home invasion shot the homeowner in the neck Thursday because he refused to drop his gun, authorities said.

Two deputies from the Charleston County Sheriff’s Office encountered the man at the rear of his mobile home in Hollywood after two other men fled on bicycles, Sheriff’s Maj. Eric Watson said in a news release.

The man was either leaving or standing at the back door of the house and was armed, Watson said. One of the two deputies shot him after he refused to give up the weapon.

After he was shot and had been placed in the ambulance, the man told police that he had exchanged gunfire with the two men who fled on bicycles. By Thursday afternoon, police had arrested one of them, identified as Thomas Zachary Brown, 22. Brown was charged with first-degree burglary and attempted murder in connection with the home invasion. Watson said Brown had not been injured.

Online court records did not indicate whether Brown had an attorney, and an operator at the sheriff's office said that information was not available.

The homeowner was taken to the hospital and was undergoing surgery, Watson said. His condition was not known immediately.

Watson said the names of the deputy and the shooting victim would be released Friday, as would copies of a dashboard camera video. He said the deputies were not equipped with body cameras.

The State Law Enforcement Division is investigating the shooting and the sheriff’s office will investigate the home invasion, Watson said.

Police released two 911 tapes of the encounter Thursday. On one, an exasperated male caller tells police, "Someone was trying to break into my house. Please come. ... It's an emergency and they have guns. Please come!"

The caller, becoming increasingly agitated with every question from the operator, says the suspects are banging on his windows and that he is hiding in a laundry room. When asked, the caller tells the operator to send deputies to both the front and the back door of the home.

About nine minutes into the call, the man shouts something unintelligible away from the phone as the 911 operator tries to get him back on the call.

In a second 911 call, a woman asks sheriff's deputies to come to an address that appears to be near the house where the home invasion took place. The caller says she saw two people on bicycles riding through her property and that something happened behind her house.

On police radio calls released Thursday, there is confusion about the identity of the man who was shot.

"It's unknown if he's part of the shooters or the victim," an officer can be heard saying after an ambulance is called to treat a man with a gunshot wound to the neck.

Later, an officer asks a dispatcher to summon the State Law Enforcement Division, which investigates officer-involved shootings.

Hollywood is a small rural community of mobile homes and brick ranch homes about 15 miles west of Charleston. The man's home is located down a dirt driveway behind two other homes.

Thursday's shooting was the second in the past month involving law enforcement in Charleston County. On April 4, a white North Charleston Police officer shot and killed a black man who he said fought with him over the officer's stun gun.

Officer Michael Slager claimed that he killed Walter Scott in self-defense. But a bystander's video showed him firing eight shots at Scott's back as he ran away. Slager has been charged with murder.

The Associated Press contributed to this report