A South Carolina sheriff's deputy was shot and wounded early Friday during a scuffle with an armed suspect who later barricaded himself inside a home before apparently killing himself, authorities said.

The scuffle occurred when a female deputy from Berkley County stepped out of her cruiser to investigate a suspicious vehicle with two people in it behind a grocery store in nearby Goose Creek, said State Law Enforcement Division spokesman Thom Berry. She had placed a passenger in her cruiser and was returning to take the driver into custody when a fight broke out.

The deputy, identified as Cpl. Kimber Gist, was shot twice below the protective body armor she was wearing, Berry said. The deputy fired her gun at some point, but it's not clear whether she hit the suspect.

Berkeley County Chief Deputy Mike Cochran said she is in stable condition and expected to recover. He said she was doing remarkably well and is in good spirits following surgery.

The suspect was black and so is the deputy.

Gist called a dispatcher shortly after 12:30 a.m. to say she had a suspect in custody and then called later to say there had been a fight. Dispatchers lost contact with the deputy, who authorities say was helped by a passer-by.

Berry said that information provided during the stop led police to an address in North Charleston, where they found the man barricaded inside.

Three people who were in the house were able to get out safely and told officers the suspect was injured and bleeding, Pryor said.

Hostage negotiators spent more than two hours talking with the suspect in an attempt to convince him to surrender, said Spencer Pryor, a spokesman for the North Charleston Police Department.

The SWAT team then moved in and found the man dead. The small beige house is located on a side street in an industrial area of the city not far from a rail line.

The name of the dead man has not yet been released. Cochran said the officer had worked as a correctional officer for a couple of years and had been a patrol officer for about a year.

The State Law Enforcement Division has taken over the investigation.

It is the second time in less than a year that a Berkeley County deputy has been wounded on the job.

Last May, sheriff's Lt. Will Rogers was shot by a masked man at a gas station. The man suspected of wounding Rogers was later shot and killed by police in Charleston when he emerged from an apartment shooting at officers.