SPRINGFIELD, Ill. (AP) — Illinois banned the sale or possession of semiautomatic weapons Tuesday when Gov. J.B. Pritzker signed legislation driven largely by the killing of seven people at a 4th of July parade last year in the Chicago suburb of Highland Park.

Pritzker acted without hesitation after the House voted 68-41 to make Illinois the ninth state, as well as Washington, D.C., to prohibit the sale or possession of semiautomatic weapons. The vote concurred with a plan the Senate OK’d Monday night.

Pritzker, who was sworn into his second term on Monday, celebrated the culmination of what he described as a four-year struggle against “the powerful forces” of gun advocacy groups.

“We will keep fighting — bill by bill, vote by vote, and protest by protest — to ensure that future generations only hear about massacres like Highland Park, Sandy Hook, and Uvalde in their textbooks,” Pritzker said in a statement.

In his inaugural address Monday, the Democrat abhorred not only the Highland Park mass shooting that also left 30 injured, but frequent gun violence in Chicago, notably the gun play that killed two 16-year-olds and injured two others last month at Benito Juarez High School on Chicago’s west side.

Critics warn the governor’s signature will trigger court challenges, which will ultimately overturn the law as a violation of the 2nd Amendment.

Ed Sullivan, a lobbyist for the Illinois State Rifle Association, said legal action will be swift. Senate President Don Harmon closed debate on Senate action Monday night by boldly declaring to critics, “See you in court.” The ISRA responded, “Challenge accepted.”

State Republicans, whose 45 seats dropped by five with a new General Assembly taking over on Wednesday, were left snarling during debate. Rep. Blaine Wilhour of Beecher City, 97 miles (156 kilometers) northeast of St. Louis, snidely complained that Democrats “despise our Founders.”

“A government willing to defy our Constitution is a government that is completely out of control. So you can sit here and dictate whatever you want today,” Wilhour said. “But I can tell you that we will not comply and you’re not going to do a darn thing about it because the law, the Constitution and the founding principles are on our side.”

The legislation bans dozens of specific brands or types of rifles and handguns, .50-caliber guns, attachments and rapid-firing devices. No rifle will be allowed to accommodate more than 10 rounds, with a 15-round limit for handguns.

Those who already own such guns will have to register them, including serial numbers, with the Illinois State Police. The new law enables merchants to sell or return current stock and Illinois-based manufacturers can sell their wares outside Illinois or to law enforcement.

Speaker Emanuel “Chris” Welch introduced his mother, Willie Mae Welch, who was with him on the House floor. Welch told how, as a teenager in 1985, his mother’s sister was fatally shot while sitting in a car outside her church. Welch’s aunt had three young girls. His parents, despite having three boys of their own, took them in. No assailant was ever apprehended.

“It’s time that we protect Illinois communities,” Welch said. “It’s time that we protect Illinois families. Let’s end families having to change overnight. Let’s not lose any more brothers and sisters, children to gun violence.”

Welch, a Democrat from the Chicago suburb of Hillside, took the lead on the measure from the original sponsor, Rep. Bob Morgan, a Democrat from suburban Deerfield who was participating in the Highland Park parade when the shooting began.

Eight states and the District of Columbia currently have bans on semiautomatic weapons, according to Tanya Schardt, working in favor of the legislation for the Brady Campaign. They differ in their definitions of semiautomatic weapons, but generally, they ban 10-round clips for long guns and handguns. The bans have survived constitutional challenges in scores of courts, she said.

Five states — California, Connecticut, Hawaii, New Jersey and New York — require registration of guns purchased previous to the law, Schardt said. The other three states with bans are Delaware, Maryland and Massachusetts.

Registration often angers current owners but most tolerate the collection of information, Schardt said.

The legislation also provides protection. If police stop a car driven by a semiautomatic gun owner, for example, they can instantly check to ensure it’s legally owned. And it allows law enforcement to trace a gun that, for example, is stolen and used in a crime.

The Senate changed Morgan’s initial proposal but compromised on changes the House could accept. For example, Morgan proposed raising the age to 21 for obtaining a Firearm Owners Identification card, but the current version allows those younger to get one with parental permission.