COVID-19 has ignited the debate over gun rights as states grapple with whether to allow gun sales while other retailers are forced to shutter.

Stores selling guns and ammunition remain legally open in 45 states that include sellers and manufacturers as essential services that are exempted from orders shutting down most commercial activity or have no such orders. In his order outlining which businesses can remain open, Gov. Doug Ducey included Arizona gun stores.

Where governors or local officials have ordered stores closed, the National Rifle Association and its allies have sued, saying the orders restrict Second Amendment rights.

Although every preliminary judicial decision so far in cases targeting state stay-at-home orders has gone against gun advocates, there are indications the aggressive legal strategy is affecting policy. The Pennsylvania Supreme Court ruled in the state’s favor, but Gov. Tom Wolf, a Democrat, later revised his order to allow gun stores to open on a limited basis. Fellow Democratic Govs. John Carney of Delaware and Phil Murphy of New Jersey also revised their states’ orders to allow gun sales.

Orders in Michigan, Massachusetts, New Mexico, New York and Washington still require gun stores to close while stay-at-home orders are in effect. Gun-rights groups have sued in three of those states, but not in Michigan or Washington.

Adam Kraut, the director of legal strategy at the Firearms Policy Coalition, a gun rights group that has sued over other orders, said the group hasn’t found suitable plaintiffs in those states who were forced to close by authorities.

Representatives for Michigan Democratic Gov. Gretchen Whitmer didn’t respond to requests for comment.

Washington Democratic Gov. Jay Inslee’s spokesman Mike Faulk confirmed the state does consider gun stores nonessential, but indicated that could change.

“There are discussions going on right now around gun shops and ranges, in addition to other businesses, on whether to deem them essential,” he said.

The state has not brought enforcement action against any gun stores, he said.

In Pennsylvania, Massachusetts, New Mexico and New York, gun-rights advocates have sued to lift statewide restrictions and they’ve sued in California over local orders.

Groups have also sued Virginia for closing indoor shooting ranges and Georgia state courts for pausing the issuance of licenses to carry guns.

Gun control groups say orders that close stores don’t impinge upon constitutional rights because they’re not meant to target gun sellers.

Other constitutionally protected businesses, like bookstores that are protected by the First Amendment’s right to free speech, have not been exempted from closure, said Eric Tirschwell, the managing director of Everytown Law, the litigation arm of the Michael Bloomberg-backed gun control group Everytown for Gun Safety.

“These orders are so broad and so general and not targeted at guns or gun stores,” Tirschwell said. “Our view is that in that framework there’s no constitutional violation. … The Second Amendment doesn’t require the government to give them special status.”

The NRA says gun stores aren’t analogous to bookstores because books can be ordered online and delivered to a home, but guns generally cannot legally be shipped anywhere but to a licensed dealer, said Amy Hunter, NRA’s director of media relations.

“Our Constitution protects our right to possess firearms for self-defense,” she wrote in an email. “A government cannot simultaneously guarantee the right to possess firearms and then eliminate the only means people have to acquire them.”

Federal direction could complicate the legal strategy for states seeking to keep gun stores closed.

The Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency added gun manufacturers and retailers to its definition of essential services in a March 28 document revising a memo that had left them off.

New Jersey’s Murphy tied his decision to the change in federal guidance.

“It wouldn’t be my definition, but that’s the definition at the federal level, and I didn’t get a vote on that,” he said at a March 30 briefing.

The change in guidance and other federal policy changes drew criticism from gun-control advocates.

Fred Guttenberg, an activist and supporter of presumptive Democratic presidential nominee Joe Biden, called the guidance “unconscionable” during a Biden virtual town hall Tuesday.

After the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives earlier this month allowed federally licensed gun stores to sell guns to buyers in their cars in order to comply with social distancing guidelines, the gun-control group Guns Down America found there were 100 times more sites for curbside gun sales as mobile testing site for COVID-19, said Igor Volsky, the organization’s executive director.

Gun sales have risen during the pandemic.

The FBI’s background check system shows that four of the five most recent weeks for which data is available — from Feb. 24 to March 28 — were among the top 10 for most background checks initiated since 1998. The week of March 16 to 22, which saw governors issue the first statewide stay-at-home orders, set a record for background checks initiated and March 20 set a single-day record.