When Gregory Jackson arrived on South Street on Saturday, he brought a handgun he was licensed to carry. And he fired that gun, prosecutors said, to settle a dispute with another man, sparking a deadly mass shooting that tore through one of Philadelphia’s most popular nightlife hubs.

But court documents reveal Jackson obtained the permit despite being arrested for carrying an illegal gun in 2020. A clerical error at a district court in Delaware County delayed that case against Jackson for months, court officials said. That mistake was only noticed last month, when the charges were finally filed, and a preliminary hearing was scheduled for later this summer.

During the intervening 17 months, Jackson successfully applied for a concealed-carry permit in Delaware County. Had Jackson been convicted in that earlier case, he would have been barred from getting that permit under Pennsylvania law.

Prosecutors in Philadelphia say Jackson, 34, an amateur boxer who went by the ring name “Japan,” fired the first shot Saturday during a fight with another man, Micah Towns. Towns, 23, who also had a permit to carry firearms, fired back at Jackson, killing him.

» READ MORE: Two men will be charged in the South Street mass shooting, the Philly DA’s Office said

After seeing Towns being attacked by Jackson, a friend of Towns’, Quran Garner, 18, began firing a ghost gun, authorities say. Another gunman, whom police were looking to arrest Wednesday, also began shooting a .40-caliber handgun, according to investigators.

Amid that chaos, two other people were killed besides Jackson — bystanders Kristopher Minners, 22, and Alexis Quinn, 24. And 11 people were wounded by gunfire. They included Towns, shot by Jackson, and Garner, who was shot in the hand by police in the incident.

Prosecutors said Towns shot and killed Jackson in self-defense and would face no charges. Garner, who is hospitalized, faces four counts of aggravated assault, two counts of assault of a law enforcement officer, firearms offenses, and related crimes.

Police say another man under arrest, Rashaan Vereen, 34, joined Jackson in beating Towns before the gunfire began, then picked up the handgun dropped after Jackson was shot, and passed it off to another, unknown man. Vereen was arraigned Wednesday on charges of attempted murder, conspiracy, and aggravated assault.

Even though Jackson ended up obtaining a carry permit issued by the sheriff’s office in Delaware County, there is evidence he flouted concealed-carry laws as recently as two years ago.

On Dec. 10, 2020, a state trooper pulled him over in Norwood, the Delaware County town where Jackson lived, for ignoring a stop sign, according to the affidavit of probable cause filed in his arrest.

As the trooper spoke with Jackson, he saw what looked and smelled like marijuana inside the car, the affidavit said. Jackson “appeared extremely nervous” during the conversation with the trooper, and his anxiety heightened as the trooper searched his Hyundai Sonata.

Inside the vehicle’s trunk, the trooper found a .38-caliber Smith & Wesson revolver, the affidavit said. Jackson did not have a license to carry a concealed weapon at the time.

State police took him to their barracks in Media, processed, and released him.

A spokesperson for Delaware County District Attorney Jack Stollsteimer said state police troopers filed the criminal complaint against Jackson not long after his arrest, including the charge for carrying an unlicensed gun, a first-degree misdemeanor, and summary driving violations. No charges were lodged regarding marijuana.

But the charges were never docketed against him, and the case went into limbo, essentially forgotten. Meanwhile, the sheriff issued Jackson a concealed-carry permit on Oct. 16, 2021, according to county records.

Clerks working for Magisterial District Judge Michael A. Burns, whose office handled Jackson’s case and its charging documents, referred all comment about the delay in charges to Burns himself. A spokesperson for the Pennsylvania’s judicial system said it would provide a statement about the delay on Wednesday, but no statement was released by early evening.

Burns’ office, like all magisterial district courts, handles preliminary hearings for criminal offenses when the charges are first filed — weighing the initial strength of an arrest — before referring cases up to the county court for a trial. Because the charges were not docketed at the local court, this process didn’t begin for nearly two years after Jackson’s arrest.

Earlier this year, as state police were reviewing pending cases at the district court level, they noticed that Jackson had never been charged in the 2020 incident, Stollsteimer’s spokesperson said. Realizing the error, the troopers refiled the charges on May 10 — still within the two-year statute of limitations — and issued a summons for Jackson’s arrest.

Even if he had been convicted on the 2020 gun arrest, it’s unlikely that Jackson would have faced jail time in the case, given the nature of the misdemeanor charge he faced. But lawyers expert in Pennsylvania gun laws say a conviction would have barred him from obtaining the carry permit.

Gun-control advocates say that Jackson’s ability to get a concealed-carry permit, as unusual as the circumstances might be, highlights the need for reforms.

» READ MORE: Kenney says Philly is ‘doing everything it can’ as probe into South Street mass shooting continues

Adam Garber, the executive director of CeaseFirePA, said he didn’t want to speculate whether Jackson would have carried a weapon without a permit. But incidents like the one on South Street, he said, show how having more hidden guns in public spaces creates more danger.

“What could’ve been just a fistfight with broken bones and black eyes turned deadly for a whole set of people,” Garber said. “The reason that happens, in heightened situations like that, is obvious: Having a concealed weapon makes it more likely that a shooting can occur.”

Garber said the concealed-carry permitting process needs to be more stringent, and better at assessing potential risks to the community, which, he argues, is the entire purpose of requiring a permit.

But gun-rights advocates, such as Jonathan Goldstein, a Hatfield-based attorney who specializes in firearms cases, say a better approach would be to give people more incentives to follow the law, rather than toughen penalties for those who don’t.

After state police finally woke up the case against Jackson in early May, he was originally scheduled to have a preliminary hearing Wednesday, but the date was pushed back to late July. Had he been found guilty, the experts said, his carry permit would have been revoked.