The suspect was taken into custody after a two-hour standoff.
Spokesman John Wukela in the city of Florence, where the deadly encounter occurred, gave an updated total Wednesday evening of officers felled by gunfire, speaking at an emotional news conference.
Major Mike Nunn, with the Florence County Sheriff's Department, said officers were serving a warrant when the suspect began shooting, wounding three deputies. The deputies had to be removed using a bulletproof vehicle.
Then, four Florence police officers were shot while trying to respond to the initial gunfire, said Allen Heidler, the Florence police chief. It was one of Heidler's officers who was killed during the confrontation.
"I want you to pray for the family who lost the bravest police officer I have ever known," Heidler said of 52-year-old Terrence Carraway, visibly overcome by emotion at the news conference.
****Major Update****— FCEMD (@FlorenceCoEMD) October 3, 2018
The active shooting situation is over and the suspect is in custody. We are asking everyone to stay away from Vintage Place as there is still an active crime investigation in progress. pic.twitter.com/1OImJOjqXS
City of Florence spokesman John Wukela confirmed Carraway's death to The Associated Press late Wednesday.
Carraway, 52, of Darlington, had recently celebrated 30 years as a police officer. He was pronounced dead at a local hospital. An autopsy will be performed at Medical University of South Carolina in Charleston, according to the coroner's office.
Nunn said the suspect held off police for two hours - holding children hostage in his home - before eventually being taken into custody. He would not release the suspect's name or condition and other details were not immediately disclosed.
Condolences and outpourings of support rolled in at news of the shooting.
"This is simply devastating news from Florence," Gov. Henry McMaster tweeted. "The selfless acts of bravery from the men and women in law enforcement is real, just like the power of prayer is real."
Thom Berry, spokesman for the State Law Enforcement Division, said the agency had sent crime scene technicians to assist officials in Florence but at this time had not been requested to help with any investigation.
Authorities said the shootings happened in Vintage Place, an upscale neighborhood in the western part of the city.
Florence, a city in South Carolina's northeastern corner home to roughly 37,000, sits at the convergence of Interstates 95 and 20. It's the largest city in the region known as the Pee Dee, an area recently affected by heavy flooding in the wake of Hurricane Florence.