California Attorney General Xavier Becerra is defending stay-at-home orders that impact the constitutional rights of residents, including their ability to purchase a firearm. In an interview with the Associated Press on Friday, Becerra said the U.S. and state constitution gives authorities broad leeway to “take actions which protect our communities and the individuals in those communities.”

A lawsuit last month by libertarian economist and actor Ben Stein argues that California’s unprecedented stay-at-home orders have effectively created a “soft police state” that put 40 million residents under the equivalent of indefinite house arrest, violating guarantees of freedom of assembly.

And several groups representing gun owners or buyers have filed multiple lawsuits alleging that some officials are restricting Second Amendment and other constitutional rights.

People still have the right to practice their religion, Becerra said, but “no one is entitled to endanger the life of someone else simply so that he can extend the exercise of his or her religion beyond means that would now start to imperil the health and life of another person.”

Becerra is right that state governments typically enjoy broad powers to address public health emergencies, but those powers are still limited by the U.S. Constitution. Becerra claims that people in California still have the ability to practice their religion, even if they can’t attend a church service in person, but that’s not the case when it comes to purchasing a firearm in some jurisdictions in California at the moment.

Church services can be moved online, and many congregations have shifted to drive-in services, allowing congregants to remain in their cars and listen to services through their car radio or speakers outside the church. Attorney Harmeet Dhillon, who’s litigating a freedom of religion challenge in California, says the state can mandate social distancing measures for those attending church, but simply shutting down services is beyond the constitutional scope of California’s police powers.

The violation is even more egregious when it comes the shutting down of gun stores in California. In those cases, it’s impossible for gun owners to substitute a trip to the gun store by shopping online. Even if they find a gun that they want to purchase by browsing a store’s website, actually buying the firearm requires an in-person trip to the store to fill out the required paperwork and go through the NICS check. California gun buyers must then return to the store ten days later in order to pick up the firearm that they’ve purchased. There is simply no legal way for the average California resident to legally acquire a firearm without making a couple of trips to a gun store, so ordering gun stores closed goes beyond a mere regulation of the right to keep and bear arms. It absolutely infringes on the rights of Californians hoping to keep and bear arms.

Unfortunately, judges hearing Second Amendment challenges to the stay-at-home orders that have declared gun stores “non-essential” in California have disagreed, stating that the temporary nature of the orders and the severity of the public health crisis the orders are meant to address outweigh any constitutional concerns. Eventually, the decisions by those judges may be overturned by the 9th Circuit Court of Appeals or the U.S. Supreme Court, but that may be too late for stores forced to shut down, many of which may not be able to re-open once they’re given the green light to do so.