A Mexican navy sailing ship about to leave New York for a goodwill tour to Iceland struck the Brooklyn Bridge Saturday night, snapping its three masts, injuring crew members and leaving some dangling from harnesses high in the air waiting for help.

New York City Mayor Eric Adams said at least 19 people needed medical treatment after the crash, including four with serious injuries, but the 142-year-old bridge was spared major damage. The cause of the collision was under investigation.

In a scene captured in multiple eyewitness videos, the ship, called the Cuauhtemoc, could be seen travelling swiftly toward the bridge near the Brooklyn side of the East River. Then, its three masts struck the bridge’s main span and snapped, one by one, as the ship kept moving.

Videos showed heavy traffic on the span at the time of the collision.

The vessel, which was flying a giant green, white and red Mexican flag and had 277 people aboard, then drifted toward the piers lining the riverbank as onlookers scrambled away.

Sailors could be seen aloft in the rigging on the damaged masts but, remarkably, no one fell into the water, officials said.