SPRINGFIELD, Ill. (AP) — Firearm traffickers in Illinois will be punished with sentences of up to 30 years in prison under legislation Gov. Bruce Rauner signed Tuesday, a move aimed at curbing Chicago’s rampant gun violence.

The new law seeks to address a problem that has vexed prosecutors in recent years: Criminals skirting Illinois’ strict gun policies by purchasing firearms in other states where little screening is required. Investigators say more than half of the firearms recovered in Illinois crime scenes are traced back to other states.

Under the new law, a first conviction for trafficking guns will carry a sentence of four to 20 years in prison. A subsequent offense will be punishable by up to 30 years.

Nearly 60 percent of the firearms used in crimes in Chicago were bought in other states, according to a 2014 report from the mayor’s office, which blamed “weaker gun laws” in those places. About 20 percent came from Indiana, where no permit is required to buy firearms and private sellers don’t have to conduct background checks.

Every state in the country supplied at least one gun that was used in a crime in Chicago, the report found. Indiana is the largest supplier, followed by Mississippi and Wisconsin, which are responsible for 6.7 percent and 3.6 percent, respectively.

In Illinois, gun purchasers need to obtain a permit – a process designed to disqualify felons, those with mental illnesses and domestic abusers among others.