Medical personnel load the body of one victim as a second deceased victim awaits following following a shooting near the Kankakee County Courthouse, Thursday morning, Aug. 26, 2021, in Kankakee, Ill. Two people were killed and another was injured Thursday morning, Mayor Christopher Curtis said. (Tiffany Blanchette/The Daily Journal via AP)

KANKAKEE, Ill. (AP) — Two men were killed and another was injured on Thursday in shootings outside a northern Illinois courthouse stemming from a long-running internal gang dispute, authorities said.

The shootings occurred after one of the victims, Victor Andrade, emerged from the Kankakee County Courthouse and was fatally shot by Antonio Hernandez, Kankakee Police Chief Robin Passwater said during a news conference.

Miguel Andrade then went to his car and retrieved a gun and engaged in a running gun battle with Hernandez outside the courthouse and into a parking lot in which Hernandez was killed, Passwater said.

Miguel Andrade was taken into custody, Passwater said. Charges are pending.

The relationship between the two Andrades was not clear.

A 20-year-old male also was shot and underwent surgery, Passwater said.

“They’re all members of the same gang. So there was some kind of internal feud with them… a long ongoing feud between them,” Passwater said.

Officers recovered “multiple” firearms, including one long gun, at the scene, the police chief said..

Kankakee is a community of about 26,000 people located about 60 miles south of Chicago.