Onlookers at Rio de Janeiro's famous Copacabana beach captured a frightening spectacle on video Saturday when a rescue helicopter crashed into the ocean.

According to the Times, the helicopter had originally been dispatched to save a struggling swimmer, who may have been caught by a strong current.

"The helicopter was getting very close to the water, and when they attempted to rescue the swimmer, the wave caught it," onlooker Alfonso Pereira told BBC. "Firemen were saving the lives of people who recklessly swam into the waves -- the sea has been raging yesterday and today."

All four of the helicopter's occupants, as well as the swimmer, escaped serious injury. Authorities have since blamed the crash on a mechanical failure, Sky News notes.

The soaked helicopter has since been dredged up from the ocean floor.

Watch video of the crash in the clip above.

Also on HuffPost: