What's considered "essential?" Food, prescription drugs, sometimes liquor — and, in most states, firearms.

To slow the spread of the coronavirus, 42 states have issued some form of a stay-at-home order, mandating that nearly all nonessential businesses close. Gun retailers in at least 30 of those states, however, have been allowed to stay open amid pushback from gun groups and the federal government.

Balking at the prospect of shuttered storefronts, gun rights advocates have sued multiple states that did not initially or explicitly deem firearms retailers essential businesses during the pandemic, arguing that a public health crisis is no excuse to trample on anyone's Second Amendment rights. Gun control groups hit back, saying the closures are strictly a public health matter — even as a number of sympathetic Democratic governors acknowledge bowing to pressure from lawsuits and the Trump administration.

"It wouldn’t have been my definition but that is the definition at the federal level, and I didn’t get a vote on that," New Jersey Gov. Phil Murphy, a Democrat, said during a recent media briefing announcing that he would reverse a decision not to include guns stores on the state's list of essential businesses.

Murphy, who faced multiple lawsuits from gun groups after his initial order, cited new federal guidance as the reason for declaring gun shops essential.

Meanwhile, in Pennsylvania, Gov. Tom Wolf, also a Democrat, issued an order on March 19 mandating the closure of the physical locations of “all non-life-sustaining business," including gun shops.

But Wolf backed down after a gun rights group, the Firearms Policy Coalition, and a civil rights law firm sued, alleging that he had “overstepped his statutory and constitutional authority” by seeking “to impose criminal and civil penalties upon those” who do not comply. Wolf revised his list to exempt gun stores, allowing them to operate under certain circumstances, including proper social distancing measures. The revised order made clear that gun stores would be exempt from closing because, under state law, gun sales must be made in person.

When California Gov. Gavin Newsom, a Democrat, ordered all nonessential businesses to close on March 19 as part of his stay-at-home order, the directive caused confusion because it left the decision about gun stores to local officials.

Los Angeles County Sheriff Alex Villanueva, for example, said he would begin closing firearms retailers, while the sheriff of San Diego County said he would not close them because they provide a "valuable public service."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Los Angeles’ decision was met with a lawsuit from gun groups, including the National Rifle Association.

The suit, filed in Los Angeles federal court, cited the Second Amendment in arguing that the government may not engage in "deprivation of constitutional liberties during a time of crisis.” The 30-page filing also argued it was illegal to "use a public health crisis as political cover to impose bans and restrictions on rights they do not like."

Villanueva quickly reversed his initial decision after guidance from the top lawyer in Los Angeles County that said the shops could stay open.

Ambiguity over what constitutes an essential business — most states with stay-at-home orders have allowed liquor stores to remain open along with grocery stores and pharmacies, for example — has prompted gun groups to seize on the uncertainty of declaring firearms retailers necessary during a pandemic.

In New York, the NRA sued Gov. Andrew Cuomo, a Democrat, last week over his March 20 order to not include gun stores as essential businesses that can stay open.

The suit, filed in federal court in New York, accused the governor of having "indefinitely suspended a key component of the Second Amendment to the United States Constitution."

New York officials, the suit said, are “going out of their way to protect liquor stores and release criminals onto the streets, while ignoring the public’s outcry over the suspension of Second Amendment rights,” the suit says. (Under Cuomo’s order, liquor stores were deemed essential businesses. Cuomo also ordered the release of some parole violators from the state’s jails out of fears they could contract coronavirus.)

Cuomo’s office did not respond to questions from NBC News about the suit. The NRA also did not respond to questions from NBC News about the numerous suits it had filed. But Wayne LaPierre, the group’s CEO, said in a statement Friday, “There isn’t a single person who has ever used a gun in self-defense who would consider it nonessential.”

The suit in New York also cited recent guidance from the Trump administration, issued just days earlier, that added workers for "firearm and ammunition product manufacturers, retailers, importers, distributors and shooting ranges" to the “essential critical infrastructure workforce.” That guidance, issued by the Cybersecurity and Infrastructure Security Agency, a unit within the Department of Homeland Security, however, is “advisory in nature” — “not a federal directive or standard,” according to the agency.

“Individual jurisdictions should add or subtract essential workforce categories based on their own requirements and discretion,” the agency said in a note included with the guidance.

The efforts to keep gun purchases available during the outbreak underscores the extraordinary demand for firearms that the crisis has created.

Firearms sales and federal background checks for purchases soared to all-time highs in March as the coronavirus pandemic brought buyers out in record numbers. The FBI conducted 3.7 million background checks last month, according to its latest figures, the highest total since the national instant check system for buyers was launched in 1998 and 1.1 million higher than the number conducted in March 2019. Small Arms Analytics and Forecasting, a consulting firm that tracks the firearms market, said the March queries to the background check system translated to nearly 2.6 million guns sold. And shares in companies that make guns and gun ammunition have risen — even amid a broader plummet in the stock market.

Meanwhile, gun control groups have strongly criticized the decisions to allow gun stores to remain open.

“Instead of listening to the gun lobby's argument that they deserve special treatment during a pandemic that has nothing to do with guns, our leaders should heed the advice of public health experts, who are in the best position to evaluate the risks of virus transmission at gun stores and any other business,” said Hannah Shearer, the litigation director at Giffords, a leading gun-safety group co-founded by shooting victim and former Rep. Gabby Giffords, D-Ariz.

Everytown for Gun Safety, a national gun control advocacy group, pointed to the fact that experts have expressed concerns about domestic violence and mental health problems, including an increased risk of suicide, that the isolation of stay-at-home orders will cause — and made clear that access to guns is likely to exacerbate both issues.

The group also ripped the legal reasoning behind the NRA’s suits, concluding in a legal analysis that the Second Amendment does not require that gun stores be considered essential businesses during a public health crisis.

“As broad laws that apply to thousands of businesses, these closure orders are clearly designed to slow the spread of COVID-19, not undermine anyone’s Second Amendment rights,” Eric Tirschwell, the managing director of the group’s legal arm said in a statement. “The courts have made clear that broad, generally applicable laws like these are constitutional.”