The drama unfolded on the deck of the Viking Line ferry Cinderella around 4pm on Sunday as the boat was moored at the Stadsgårds pier in Stockholm.
The man who jumped overboard managed to survive the fall and get back onboard the boat
"He was able to find a ladder on the stern of the boat," Bengt Hellström of the Södermalm police told the Aftonbladet newspaper.
"He was really lucky to survive. If he'd twisted in the slightest, we would have been killed by the impact with the hard water."
The 28-year-old man was arrested by guards onboard the ferry and then turned over to police.
The victim was taken to hospital, but escaped the harrowing fall without sustaining any serious injuries.
It remains unclear exactly what prompted the man to jump over the ferry's railing and into the chilly waters of Stockholm harbour.
"They were travelling together, but they reportedly had made each other's acquaintance rather recently," Hellström told the paper.
Police have classified the incident as attempted murder.
"If a person forces a someone to jump 27 metres down into the water, that person should realize that normally, you don't survive," said Hellström
Follow The Local on Twitter