CHICAGO (AP) — Gov. Bruce Rauner vetoed legislation Tuesday that would have required gun retailers to be licensed by the state of Illinois, calling it “unnecessary, burdensome regulation” that would have hurt small business owners and wouldn’t have made communities safer.

“The core issue is not which guns to legally ban or regulate,” the Republican said. “We have ample proof that such narrowly focused legislative responses make for good political cover, but they do little to stop the illegal flow of guns into Illinois or prevent people from committing thousands of crimes in our state each year with illegal guns.”

The veto comes a week before the state’s primary election in which Rauner faces a challenge from conservative state Rep. Jeanne Ives, who says Rauner has betrayed Republicans with his actions on several issues. Last week, Ives’ campaign criticized the governor for not publicly stating his position on the licensing bill, calling it “the prelude to yet another betrayal.”

The Democratic-controlled General Assembly passed the measure and sent it to Rauner about two weeks ago, giving him 60 days to take action on it.

The bill had the backing of Chicago Mayor Rahm Emanuel and Chicago Police Superintendent Eddie Johnson, as well as the three leading Democrats seeking their party’s nomination for governor on March 20. On Tuesday, Emanuel called Rauner’s veto “a slap in the face to crime victims, faith leaders and police” who pleaded with him to sign the legislation.

“With one week left in his campaign, Governor Rauner just put his primary election ahead of his primary responsibility to protect the safety of the people of Chicago and Illinois,” Emanuel said in a statement. “The governor’s decision was cruel, it was cold and it was calculated to benefit his own politics at the expense of public safety.”

The bill was among several measures passed response to the shooting deaths of 17 people at a Florida school and ongoing gun violence in Chicago, including the fatal shooting of a Chicago police commander. It would have required the Illinois Department of Financial and Professional Regulation to collect $1,000 from each dealer for a five-year license and for the training of gun shop employees and videotaping of “critical areas” of such businesses.

The sponsor, Addison Democratic Rep. Kathleen Willis, has said that state oversight would identify and eliminate the practice of straw purchasers buying guns legally and then selling them to criminals.

But opponents noted that the federal Bureau of Alcohol, Tobacco, Firearms and Explosives already licenses gun dealers and its audits are time-intensive and expensive — a point Rauner also noted Tuesday as a reason for his veto.

“It’s redundant on top of existing federal regulation, it’s crushing to our small business owners and creates bureaucracy that really doesn’t help keep our communities safer,” he told WJPF radio in southern Illinois on Tuesday morning.

The Legislature narrowly passed the bill last month, making it unlikely that Rauner’s veto could be overridden.

Other measures still pending include a measure to ban bump stocks, which increase rifles’ firing rates, and to prohibit anyone younger than 21 from buying assault-style weapons like the one used in the Florida shooting. Rauner has indicated he supports the bump stock ban, but hasn’t publicly stated a position on other gun bills.