Officials lifted evacuation orders for thousands of people as crews worked to secure a damaged tank holding toxic chemicals.