Railway lines were closed for around two and a half hours after the crash