State of emergency after train derailment