The Trump administration said it would appeal against the ruling shortly after it was announced.