Correction: In an earlier version of this article Saturday, the suspect was misidentified based on initial information from GBI officials.

A Gwinnett County deputy was shot as officers chased a suspect in a stolen car Friday evening near an apartment complex in Duluth, officials confirmed.

SWAT team officers responded to the Anzio Apartments in the 3100 block of Sweetwater Road and captured the alleged shooter after he barricaded himself in the car.

The GBI was asked to investigate the shooting Friday night, a spokesperson for the state agency confirmed. The sheriff’s office has launched an internal investigation into the shooting, department officials said Friday.

GBI officials identified the alleged shooter as 34-year-old James Edward Perkins in a statement Saturday afternoon. The sheriff’s office identified the deputy only as Master Deputy Sheriff N. Butler.

Authorities confirmed the incident started shortly after 5 p.m. Gwinnett County police officers and sheriff’s deputies were on the lookout for a stolen vehicle, the GBI said. They spotted the SUV at a Goodwill Thrift Store and Donation Center in Lawrenceville.

Officers detained a female passenger, but Perkins managed to escape in the stolen vehicle, GBI investigators said.

Gwinnett police said in a news release that gunfire was exchanged after its officers and sheriff’s deputies tried to stop the stolen vehicle.

Perkins led officers on a high-speed chase during which he hit several patrol cars and civilian vehicles, a police spokesperson said. The chase ended at Anzio Apartments when he tried driving between the clubhouse and an apartment unit and went over a steep drop-off that disabled the SUV, GBI officials said. Perkins then barricaded himself inside the vehicle, according to authorities. That’s when the shootout ensued.

Dozens of gunshots could be heard in videos that residents posted on social media. The GBI said Perkins shot a sheriff’s office K-9 deputy several times as he approached the SUV. Other officers at the scene returned fire and struck Perkins. The deputy’s K-9 was not injured, police confirmed Saturday.

The police department’s SWAT team moved in to apprehend the suspect, who was taken to Northside Hospital Gwinnett in Lawrenceville. He remained there in critical condition Saturday, the GBI’s statement indicated.

Officials have not said what charges Perkins might face if he survives. It’s not clear if he lived in the complex, police said.

The wounded deputy was also taken to Northside Hospital Gwinnett. By Saturday evening, the deputy was released and was “doing very well,” according to the sheriff’s office.

Friday’s incident marked the 57th officer-involved shooting the GBI has been asked to investigate so far this year. The AJC also tracks officer-involved shootings that don’t involve the GBI, and those numbers sometimes differ from the GBI’s tally.