LOS ANGELES — A Los Angeles Superior Court judge Tuesday upheld the city’s decision to deem gun stores non-essential businesses and force them to close during the coronavirus pandemic.

Several businesses and a gun-rights group sued the city April 3 and requested a temporary restraining order allowing shops to reopen.

City Attorney Mike Feuer said the request was rejected by Superior Court Judge Mary Strobel.

“I’m very pleased that once again our office has successfully defended the mayor’s Safer at Home Order against a push to open gun stores during this public health emergency,” Feuer said in a statement. “The mayor’s order treats gun stores and other non-essential businesses the same, requiring them all to be closed to protect public health and speed the day Angelenos can get back to work.”

The businesses and gun-rights group alleged in their lawsuit that the city of Los Angeles does not have the legal authority to shutter gun stores amid the coronavirus crisis.

The petitioners were the California Rifle & Pistol Association, Turner’s Operations Inc., FFL Guard LLC and Traders Loan and Jewelry Inc.

“The city’s order is unlawful,” the petitioners allege. “It violates an express order by the state public health officer and director that workers in 16 critical infrastructure sectors identified by the federal government continue to be allowed to work during the COVID-19 crisis.”

Gov. Gavin Newsom in March said he would leave it up to sheriff’s departments to decide whether to close gun shops.

U.S. District Judge Andre Birotte Jr. on April 6 denied a similar request asking that gun shops in the city and Los Angeles County be permitted to open.