Injunction issued after challenge by oil sector groups and states