Despite initially losing in the court of appeals, the environmental groups took their case to the California Supreme Court.