Two cyclists in Brazil got the ‘freight’of their lives when they rode into a railway tunnel – and met a goods train coming straight towards them.

One of the riders, Jedson Gil Miranda from Volta Redonda in the state of Rio de Janeiro, posted footage to Facebook of the moment he and his cycling buddy Felipe Vieira had to scramble for their lives as the train driver sounded its horn.

Luckily, both managed to scramble to safety, leaving one of the bikes behind which they later retrieved as they continued their journey through the tunnel, presumably without further incident.

Writing on Facebook, Gil said: “I know we were in the wrong, we were very reckless, railway tunnels were never made for cycling or walking.

“Thank God everything went okay,” he added.

The video has been viewed nearly 50,000 times on Facebook and Gil has subsequently posted photos of another ride where he is pointing to various trackside safety notices.