A woman and her two-year-old son were walking on the iron bridge which runs over Huntington Road in York at around 2.30pm yesterday when a man approached them and took hold of the child.
The boy's mother shouted at the suspect and two men in high-vis jackets approached him.
The suspect then let go of the child and ran off.
Police say the mum and boy were both very shaken but no one was hurt.
The two men in high-vis checked on the mother and stayed with her for a short time.
A man has been arrested in connection with the incident and is in police custody.
Police are appealing for anyone who saw what happened and the two men in high-vis jackets to get in touch.
Anyone who can help should call police on 101, quoting reference 12210088176.
A spokesperson for North Yorkshire Police said: “Residents can be reassured that York is a very safe place and incidents of this nature are extremely rare.
"In this case, a suspect was quickly identified, arrested, and taken into