Police were called to the St George's Bridge in Doncaster at around 3pm after concerns were raised for a man's well-being.
Residents reported seeing a man threatening to jump off the bridge.
Trains were delayed as a result of the incident and traffic on the bridge was brought to a standstill.
South Yorkshire Police officers arrived at the scene and were able to talk the man down from the bridge after 30 minutes.
He has now been detained under the Mental Health Act.