A pointsman on patrol duty found that the ballast has caved in to a depth of 70 cm and alerted officials, who rushed tothe spot and restored the track, railway officials said.
They said it was suspected that a porcupine could have dug the earth resulting in the caving in of the ballast.
The incident delayed Thiruvananthapuram-Mangaluru Malabar Express and two other trains by around 45 minutes.