Rescue officials had to use a helicopter for a rescue in rough seas off the coast of Massachusetts after someone on a passing ferry spotted a person in the Atlantic Ocean.

The Falmouth Police Department says it all happened around 3:30 p.m. local time Monday when the Steamship Authority Ferry crew first unsuccessfully attempted to rescue the person with life rings.

Given poor visibility and rough seas due to storm conditions, other agencies, including the U.S. Coast Guard, jumped in to help search for the person. After the person was located again about an hour later, a rescue swimmer helped get the victim hoisted onto a helicopter.

Officials say the person was taken to a hospital, but their condition was not considered life-threatening.

Falmouth Police are currently investigating how the victim entered the water.