Early morning train services were disrupted following an incident near Barry Docks.
British Transport Police said one man was taken to safety after they were spotted "in a precarious position" early on Monday morning.
The Vale of Glamorgan Line was blocked between Eastbrook and Barry, affecting services to and from Cardiff Central.
It also affected lines between Rhymney / Bargoed / Caerphilly and Barry Island, as well as from Rhymney and Cardiff Central to Bridgend.
Transport for Wales later confirmed the line had reopened, but they warned services were still subject to delays, cancellations and alteration following the incident.
A BTP spokesperson said: "Officers were called to the line near Barry Docks just after 5am today (11 November) to reports of a person in a precarious position. Officers attended alongside paramedics. A man has now been taken to a place of safety."

Warning Issued After Reports of Rogue Gutter Cleaners in Barry
Safety Checks to Begin at Hundreds of Vale Homes as National Grid Launches Inspection Programme
Senedd Members support calls for better paternity leave in UK-wide parent strike
Network Rail announces community engagement sessions on future of Brookside level crossing
Coastal Litter Pick Series Announced for Glamorgan Heritage Coast
Glamorgan Archives invites visitors behind the scenes to discover centuries of history
£200,000 Secured for Next Phase of Barry RFC Sports & Community Hub Redevelopment
Walk‑In Hepatitis A Vaccination Clinics Open in Barry as Health Board Expands Outbreak Response
Over 27.4% of Vale GCSE students acheive A or A* Grade
Rhoose Community Library Marks Ten Years as Volunteer‑Run Community Hub
Calls to build a new Lido re-surface with resident saying the town "is in dire need of"
Barry Man’s 190‑Mile Charity Walk Reaches Day Two as He Heads Home to the Town That Changed His Life
Hepatitis A Vaccination Programme Launched for Young Children in Barry Amid Ongoing Local Cases
Barry Councillor Urges Local Chapels to Help Update Wales‑Wide Heritage Project
Dispersal Order issued at Cosmeston as council warns of ‘extremely dangerous’ behaviour
Three Rescues in 24 Hours as RNLI Barry Dock Urges Caution Around Sully Island
Police Investigate ATM Theft in Cowbridge After Pensioner Targeted
Break‑In at St Athan Community Centre Forces Volunteers to Divert Funds from Upcoming Events
Vale Students Celebrate Strong A and AS Level Results
Llantwit Major School Celebrates Record-Breaking A Level Success