Trains between Bargoed and Rhymney in Caerphilly county are to be suspended over the weekend because of a landslide.
The landslide near Tirphil on the Rhymney Valley line caused a five metre wide hole near the railway.
A replacement bus service and a temporary timetable is in operation between the two stations.
The railway line is expected to re-open Monday 22 November once engineers have cleared the line.
Gwent Police received reports on Wednesday night that a large hole had opened up near the railway line and road at Station Row, Tirphil.
Wales and West Utilities said the incident was caused by storm water overwhelming a culvert.
However, the gas main was not damaged and supplies to customers are not affected.
Caerphilly council said staff had made the area safe, working throughout the night.
The road remained closed on Thursday morning and the council said it was working closely with various agencies to resolve the situation.
Utilities engineers made excavations further along the road so the gas main could be cut off at short notice if necessary.
A spokesman from Arriva Trains Wales said: "We are making every effort to minimise the disruption to the service and working closely with Network Rail and other agencies towards resuming a normal service as soon as possible.
"We apologise to our customers for any inconvenience caused by the disruption."
Information regarding the temporary timetable and service updates will be published on the Arriva Trains Wales website www.arrivatrainswales.co.uk