Semiautomatic AR-15s are displayed at Good Guys Guns & Range in Orem, Utah, on Feb. 15. (George Frey/Getty Images)

With the future of federal gun control legislation uncertain, an affluent Chicago suburb this week took the aggressive step of banning assault weapons within its borders, in what local officials said was a direct response to the mass shooting at a Parkland, Fla., high school earlier this year.

Officials in Deerfield, Ill., unanimously approved the ordinance, which prohibits the possession, manufacture or sale of a range of firearms, as well as large-capacity magazines. Residents of the 19,000-person village have until June 13 to remove the guns from village limits or face up to $1,000 per day in fines.

The measure drew a swift criticism from the National Rifle Association and the gun rights group Guns Save Life, which said they would sue Deerfield to overturn the ban.

“Every law-abiding villager of Deerfield has the right to protect themselves, their homes, and their loved ones with the firearm that best suits their needs,” Chris W. Cox, executive director of the NRA’s lobbying arm, said in a statement.

Deerfield Mayor Harriet Rosenthal said officials took up the ordinance because of the February massacre at Marjory Stoneman Douglas High School, where a gunman armed with a military-style rifle shot and killed 17 students and staff members before police arrested him.

“We hope that our local decision helps spur state and national leaders to take steps to make our communities safer,” Rosenthal said in a statement.

Congress and state and local legislatures around the country have faced mounting calls to enact similar measures in the wake of the Parkland shooting and the nationwide student-led demonstrations in support of gun control that followed.

Polls conducted in recent weeks have shown growing public support for assault weapons bans. A Feb. 20 Quinnipiac poll found that 67 percent of Americans, including 43 percent of Republicans, favored such a ban, as The Washington Post has reported.

Most proposals have struggled to gain traction. In early March, Florida lawmakers voted down a bill to ban assault weapons, then held a moment of silence for victims of the Parkland shooting. Two assault weapons ban bills in Congress have garnered broad Democratic support but lack Republican co-sponsors.

Several powerful federal appeals courts have ruled that prohibitions on assault weapons were permissible under the Second Amendment, and no federal appeals court has ever held that assault weapons were protected, as The Post’s Meagan Flynn and Fred Barbash have reported. Those courts have also found that states and municipalities have sound reasons to ban military-style weapons without curtailing people’s right to self-defense.

The U.S. Supreme Court has ruled that the Second Amendment protects an individual right to possess a firearm, but the high court has not directly addressed assault weapons in the same context.

Deerfield’s ordinance was modeled after a 2013 measure enacted in nearby Highland Park, Ill., that banned assault weapons, which that city defined as “any semiautomatic gun that can accept a large-capacity magazine.”

After gun rights advocates sued to challenge the Highland Park ordinance, the U.S. Court of Appeals for the 7th Circuit ruled in the city’s favor, finding that the ban left residents “with many self-defense options,” including handguns.

“A ban on assault weapons and large-capacity magazines might not prevent shootings in Highland Park,” the court said, “but it may reduce the carnage if a mass shooting occurs.”

Deerfield’s ban includes semiautomatic rifles, semiautomatic shotguns and semiautomatic pistols with detachable magazines that can hold 10 or more rounds of ammunition. It specifically names several models, including the TEC-9 pistol and the AR-15, which was used in mass shootings in Newtown, Conn.; Las Vegas; and San Bernardino, Calif. Such weapons are “dangerous and unusual,” states the ordinance, which also alleges that state and federal authorities had failed to regulate them.

Police in Deerfield will have the power to confiscate banned weapons and destroy them after determining they were not needed as evidence. People who hang on to their weapons could face daily fines between $250 and $1,000.

In addition to the Parkland shooting, the ordinance noted other recent mass shootings with fatalities in the double digits: the Sutherland Springs, Tex., church shooting that killed 26 people; the Las Vegas music festival shooting that killed 58 people; and the Pulse nightclub shooting in Orlando that killed 49 people. The four shootings combined claimed 150 lives.

Opponents of the ban said they felt less safe after it passed, and worried that it would open the door to further restrictions.

“You are the bureaucrats that Thomas Jefferson warned us about,” Deerfield resident Dan Cox told the Deerfield Village Board at a meeting Monday night, according to the local ABC affiliate. He was one of more than a dozen opponents who spoke out against the ordinance, local media reported.

Ariella Kharasch, a Deerfield High School senior who backs the measure, said she hoped the ban would spur similar legislation on the local and national level.

“This is our generation’s fight,” she said, according to the Chicago Tribune. “Change happens gradually step by step. The fight does not end at the borders of our village.”

More from Morning Mix:

Ivanka Trump is featured on the cover of a punk band’s new ‘Complicit’ album

Twin sisters known for battle with debilitating OCD die in possible ‘suicide pact’