A California court has faulted an oil and gas company for conducting repair work without a permit on a pipeline that has been shuttered for a decade since it dumped more than 100,000 gallons of crude onto the Santa Barbara coast.

The ruling from the California Superior Court in Santa Barbara came after Sable Offshore Corp. resisted state regulators’ orders preventing the company from beginning work to revive the crude oil pipeline system until it obtained the proper permit.

The California Coastal Commission acted within its power when it ordered Sable to stop construction work last spring, said Judge Thomas Anderle, writing a tentative ruling that was adopted by the court Wednesday.

Anderle said his decision did not address whether the work conducted by Sable was “ultimately necessary or appropriate for pipeline safety,” but rather the question of whether the orders were an abuse of the commission’s discretion.