A state appeals court issued an order late Friday that blocks the Southern California Gas Co. from restarting injections of natural gas at the Aliso Canyon storage facility near Porter Ranch, just hours after a Los Angeles Superior Court judge denied the county’s request to stop operations.

Saying he had no authority over state regulators, L.A. County Superior Court Judge John Wiley ruled Friday afternoon that he can’t stop natural gas injections from resuming into wells in Aliso Canyon.

Wiley made the ruling inside a packed hearing room at a courthouse in the Westlake area of Los Angeles. He said he had to deny the county’s request for an injunction that would prevent the Southern California Gas Co. from restarting operations because of two state statutes that barred him from issuing a restraining order.

He also said the county’s case for halting injections was unconvincing. The county says there is enough natural gas already in the wells to cover “worst case gas reliability scenario.” But Wiley was unswayed.

“When winter comes and Los Angeles needs gas for heating, the County proposes to use Aliso Canyon only for emergency purposes,” Wiley noted in his ruling. “The County … does not, however, set out the details of this worst case scenario. How hard will the coming winter be? How cold will it get and for how long?”

The first ruling came as a shock and disappointment to Porter Ranch residents, who for 17 months have held rallies and petition drives and have called on Gov. Jerry Brown to step in and authorize shutting down the Aliso Canyon natural gas field above their homes.

That’s where in 2015, a massive natural gas leak above their community sickened thousands of people, forcing them to temporarily leave their homes in the northwestern San Fernando Valley. The reported 100,000 metric tons of methane that spewed from one of 115 aged wells over more than three months in Aliso Canyon was considered unprecedented.

The leak was capped in February 2016, and 60 percent of the wells were taken offline, but the root cause of the leak continues to be investigated, state regulators said.

That’s where in 2015, a massive natural gas leak above their community sickened thousands of people, forcing them to temporarily leave their homes in the northwestern San Fernando Valley. The reported 100,000 metric tons of methane that spewed from one of 115 aged wells over more than three months in Aliso Canyon was considered unprecedented.

The leak was capped in February 2016, and 60 percent of the wells were taken offline, but the root cause of the leak continues to be investigated, state regulators said.

The leak was capped in February 2016, and 60 percent of the wells were taken offline, but the root cause of the leak continues to be investigated, state regulators said.

An attorney for the county, Skip Miller, said he was told that Southern California Gas Co. could restart gas injections as soon as today. But after the judge’s ruling, Miller was able to file a motion with the state Court of Appeals by the end of the day, and his request for an emergency stay was granted Friday evening.

State regulators and SoCalGas have until this evening to appeal. The higher court will then decide if it will grant the county additional injunctive relief.

State regulators and SoCalGas have until this evening to appeal. The higher court will then decide if it will grant the county additional injunctive relief.

Friday’s legal wrangling came a little more than a week after the state Department of Conservation’s Division of Oil, Gas & Geothermal Resources and the California Public Utilities Commission said that about a third, or 42, of the wells are safe for Southern California Gas Co. to resume gas injections.

In response to Wiley’s ruling, SoCalGas spokesman Chris Gilbride said injections will continue as soon as the company completes all safety measures. A status report on the SoCalGas website stated all safety measures were completed as of Friday, but Gilbride said a small aircraft was still conducting flyovers over the wells, to measure methane levels.

“When injection operations begin, monitoring and reporting activities will continue to meet compliance requirements,” he said in a statement. “In support of continued safety, Aliso Canyon will be held to what state regulators have called the most rigorous monitoring, inspection and safety requirements in the nation.”

But county officials said state regulators made the recommendation despite a warning by a former SoCalGas manager that potential “catastrophic loss of life” could happen in the event of a major earthquake, according to court documents.

“The County’s first priority is to protect the health and safety of the residents of Porter Ranch and the northwest San Fernando Valley,” said L.A. County Supervisor Kathryn Barger in a statement in response to Wiley’s ruling. “I believe that allowing Aliso Canyon to begin reinjecting puts the residents in a potentially unsafe environment.

Local leaders, activists and residents have said a root cause of the leak has never been established and that a seismic study and risk assessment/emergency response plan for Aliso Canyon still aren’t finished. There also have been almost 950 complaints of nosebleeds, headaches and nausea made to the Los Angeles County Department of Public Health since March 2016.

Matt Pakucko, co-founder of the group Save Porter Ranch, told reporters outside the courtroom he was disappointed with Wiley’s decision.

“I’m sick to my stomach,” he said. “The judge can’t read. The county needs to step up and file its appeal and go to the Supreme Court. That’s what they need to do.”

That’s exactly what happened later in the day. But the stay could be overturned this weekend pending any other appeals by the state or SoCalGas.