Investigators found that the derailment was caused by a switch malfunction triggered by a loose nut from track, and suspected that a repairman failed to tighten it during maintenance the previous night.