To understand why it’s so hard to stop the flow of guns across state lines to cities like Chicago, you have to start with a simple fact: Firearms are legal.

As the Supreme Court has ruled repeatedly, most American adults are allowed to have them. That means millions of people can acquire guns legally — and are potential sources of guns that might later be stolen or illegally sold, traded or loaned.

Regulations vary by city and state, and most are loose. As the Chicago Sun-Times, ProPublica Illinois and WBEZ Chicago recently reported, most guns seized by the Chicago Police Department originally were bought out of state. And even when authorities know a gun has changed hands unlawfully, they often can’t determine its ownership history.

“What comes between that first sale and the recovery is the question,” says Philip Cook, a University of Chicago Crime Lab researcher and professor at Duke University.

It adds up to what some officials describe as a kind of law enforcement whack-a-mole: Police and prosecutors spend significant resources targeting people caught possessing illegal guns — usually at the end of a long chain of ownership — with little hope of thwarting illicit gun markets.

In the face of a two-year rise in violence in Chicago, authorities have stepped up efforts to prosecute gun crimes. Through Oct. 4, federal prosecutors in Chicago filed more gun charges this year than in any full year in a decade — mostly for illegal gun possession, records show.

In some cases, authorities say the guns were brought from out of state, but no one was charged with trafficking. The reason: There’s no federal trafficking law.

Local authorities lock up thousands of people a year on gun charges, almost always for possession. Like federal officials, they rarely arrest or prosecute people for trafficking firearms, though such charges carry far stiffer sentences.

There is a state trafficking law, but prosecutors say the cases are hard to prove.

The most common charge: being a felon in possession of a firearm, accounting for 73 percent of gun charges in 2017. Then: using a gun in connection with drug trafficking (17 percent); selling guns without a license (8 percent); and making a false statement in a gun purchase (2 percent).

Over the past decade, the proportion of gun defendants facing possession charges has doubled.

Neither the federal Bureau of Alcohol, Tobacco, Firearms and Explosives nor the U.S. attorney’s office in Chicago would comment about how they go after underground gun markets.

Some federal authorities and lawmakers want to create another tool. U.S. Rep. Robin Kelly, D-Illinois, who represents parts of the South Side and south suburbs, has cosponsored the proposed Gun Trafficking Prevention Act of 2017 to ban the purchase or sale of a gun with the intent to transfer it illegally.

But only three Republicans are cosponsors, and the bill has been buried in committee since its March introduction.

On the state level, Illinois prohibits trafficking guns from out of state and gun-running — the illegal transfer of at least three guns. But police and prosecutors in Chicago almost never charge anyone with those offenses:

• Since 2007, nine of 10 weapons arrests by police in Chicago have been for illegal gun possession, according to the city’s crime database.

• During that time, the police have made more than 27,000 arrests for illegal gun possession — “unlawful use of a weapon” under state law. But they have made just 142 arrests for illegal gun sales — none for trafficking or gun-running.

• Since 2013, Cook County prosecutors have filed illegal gun possession charges 9,724 times and gun-running just 12 times. They haven’t charged anyone with trafficking guns.

The Chicago Police Department works with ATF to trace every illegal gun it recovers, police spokesman Anthony Guglielmi says. But most have been sold, stolen or lent repeatedly, he says: “They can be on the street for years.”

First Assistant Cook County State’s Attorney Eric Sussman. | Ashlee Rezin / Sun-Times

Federal laws limit the ability of authorities to keep records, so no national gun registry exists. Officials are often unable to determine a gun’s full ownership history. Without that, it’s hard to prove trafficking.

“If a car is used in a shooting or robbery, I can easily find out, in a matter of minutes, who owned that car,” says Eric Sussman, a former federal prosecutor who’s Cook County State’s Attorney Kim Foxx’s top deputy. “Gun laws are intentionally set up where there is no searchable database.”

Even with a gun’s history, building a trafficking or gun-running case can be tough. It takes time and resources, and the laws are narrowly written — for instance, only state residents can be charged with trafficking in Illinois, though most guns in Chicago come from out of state.

“You have to prove that they’re transferring to someone who’s not allowed to have them, or they’re transferring them for illegal purposes,” Sussman says. “And that’s a high burden.”