A collection of gun-rights groups filed a federal suit on Thursday against Massachusetts governor Charlie Baker (R.) challenging his order to close gun stores.

The gun-rights activists said the governor's shutdown order violates the Second Amendment by effectively banning the lawful purchase of guns and ammunition in the state. They asked the United States District Court for Massachusetts to strike down the order and allow gun stores to reopen.

"Defendants' acts prohibiting the operation of any and all consumer-oriented firearms businesses operates to completely prohibit law-abiding individuals from purchasing ammunition, and to effectively prevent most of them from purchasing firearms," the complaint says. "Independently and collectively, these acts stand as a perpetual bar on acquiring firearms and ammunition for the purpose of protecting one's self and family (or indeed, for any other lawful purpose)."

The suit is the latest in a string of cases across the country challenging the closure of gun retailers in an effort to stop the spread of the coronavirus. The outcome could determine how far the emergency powers of state and local officials extend and where they butt up against constitutional rights.

The federal government has attempted to prevent such legal battles by adding gun stores, ranges, and manufacturers to its "essential business" list in coronavirus guidelines provided to state and local officials. That designation led Pennsylvania, New Jersey, Los Angeles County, and Wake County, N.C., to reverse previous closure orders. Massachusetts, which allowed gun stores to remain open in the first weeks of the outbreak, removed gun stores from its "essential" business list just days after the Department of Homeland Security updated the federal recommendations.

Gun-rights groups have argued gun stores are "essential" and should be allowed to remain open during the pandemic.

"Closing gun stores and preventing citizens from exercising their Second Amendment rights is not the way to fight a viral pandemic," said Alan Gottlieb, founder of the Second Amendment Foundation, which is a plaintiff in the Massachusetts case.

The shutdown order has angered local activists and led the Massachusetts-based group Commonwealth Second Amendment to join the suit. Spokesman Brent Carlton compared closing gun stores to shuttering media outlets. "The Baker administration can no more block exercise of the Second Amendment by preventing Massachusetts residents from purchasing firearms than the Trump administration can limit the First Amendment by closing the New York Times or CNN," he said.

Adam Kraut, director of legal strategy for plaintiff Firearms Policy Coalition, said the shutdown order violates the principles that Massachusetts was founded upon.

"During the Massachusetts ratifying convention, Samuel Adams proposed an amendment guaranteeing that the constitution would not prevent peaceable citizens from keeping their own arms. Yet, the modern-day Massachusetts government seeks to do just that," he said.

Baker's office did not immediately respond to a request for comment.

Second Amendment activists have achieved mixed results in the legal battle against shutdowns. Two federal judges have refused to block shutdowns in California. The Pennsylvania Supreme Court denied efforts to prevent Governor Tom Wolf (D.) from shutting down stores. Gun-rights activists have enjoyed some success when government officials move beyond retailers and attempt to shut down the permit process used in gun sales. In March, a North Carolina judge forced Wake County sheriff Gerald Baker (D.) to reopen the pistol purchase permit process following a lawsuit from activists.

Gun-control groups have advocated for forced closures in recent weeks. Everytown for Gun Safety and Brady United both issued memos encouraging government officials to ignore the federal guidance and shut down gun sales during the pandemic.

Second Amendment activists have vowed to keep fighting shutdown orders that target gun shops.

"There is no COVID-19 exception in the Constitution, and even this crisis has constitutional limits," Kraut said.