TAMPA, Fla. (WFLA) — A U.S. Coast Guard helicopter nearly crashed into the Gulf of Mexico while attempting to rescue a passenger aboard a Carnival cruise ship on Saturday.

Video shared by U.S. Coast Guard Air Station New Orleans shows rescue crews aboard an MH-60 Jayhawk helicopter approaching the Carnival Dream cruise ship roughly 300 miles offshore from Fort Morgan, Alabama.

The crew was attempting to medivac a passenger who was experiencing “heart attack-like symptoms” when inclement weather interfered with the rescue operation.

Cellphone video taken by a passenger aboard the cruise ship shows the Jayhawk struggling to fight the wind as it moves away from the ship. Seconds pass before the helicopter drops perilously close to the surface of the water.

Anxious onlookers shouted, “go up, go up” as the aircraft disappeared into the dense fog.

“During the rescue, the aircrew experienced severe and rapidly deteriorating weather that forced them to abort the mission,” Cmdr. Keith Blair, commanding officer, Air Station New Orleans told al.com.

Cmdr. Blair added “Through exceptional real-time risk management” and “superb piloting,” the crew were able to safely land back at the air station.

The passenger was ultimately flown to University Medical Center in New Orleans.