The Nigeria Railway Corporation indefinitely suspended train services on a major route linking the capital, Abuja, to the north-western state of Kaduna after an armed gang attacked a passenger train on Wednesday.
Eyewitnesses said the attackers targeted the engine driver and the train tank. No casualty was reported.
One of the passengers told the BBC that they heard a loud bang before the train stopped for several hours.
Former Nigerian Senator Shehu Sani has tweeted that a second train on the route was forced to return to Abuja on Thursday after explosives were detonated on the railway.
In a statement, the Nigeria Railway Corporation said "efforts are being put in place to ensure absolute safety along the route".
The railway service is often considered a safer alternative to road travel due to persistent bandit attacks on vehicles and kidnapping of travellers on the Abuja- Kaduna highway.