A South Carolina police officer was shot and killed Friday while pursuing a gang member who ended up shooting himself, authorities said.

Greenville Police Officer Allen Jacobs, 28, and his partner were on patrol when they spotted Deontea Perry Mackey behind a house in Nicholtown and pulled over for a field interview, Police Chief Ken Miller said.

Instead, Mackey bolted and led officers on a foot chase behind houses and through woods, according to Greenville Online. Miller said Jacobs kept pace with Mackey and about 20 seconds after they called the chase in on the radio, a second call came in of an officer down.

Jacobs was struck multiple times, despite wearing a bulletproof vest. Officers who arrived on the scene gave Jacobs CPR before he was transported to Greenville Memorial Hospital where he later died, according to Greenville Online.

Mackey continued running from the police, but was eventually cornered. Authorities said officers witnessed him calling his mother before turning the gun on himself. Miller said he was listed as a gang member in a national police data base, but wouldn’t identify the gang.

Jacobs, a decorated Iraq War veteran, leaves behind a pregnant wife and two young sons. He was the son of two teachers and a four-year veteran of the Greenville Police Department.

According to WHNS-TV, Miller described Jacobs as an “extraordinary person and officer…He was dedicated as anybody could be dedicated. That’s why he was out doing what he was doing today.”

“This is everyone’s worst nightmare,” Miller said. He was out doing our work. He’s a member of our community, and he was trying to keep us safe.”

Jacobs was a part of the police department’s community outreach program and was working to identify and engage gang members within Nicholtown.

An unidentified family friend of Mackey told WHNS-TV that he was a “sweet son” and a “good kid.”

"I'm praying for him and also the officer that lost their life... It's crazy, so crazy that this happened, but you just have to trust in God and believe that he will work it out for you," she added.

Police don’t believe officers fired any shots. Jacobs’ firearm was still on his holster when officers arrived.

An autopsy is scheduled for Saturday.

Click for more from Greenville Online.

Click for more from WHNS-TV.