Three men aboard a 19-ft skiff set off for a short sailing trip into the south Pacific. The weather grew rough, and the tiny ship was tossed into the sea on Monday night.

Stranded in the dark and their ship lost far from ground, the men could only swim.

Buoyed by life vests, they swam nearly two miles under a dark sky until they reached the long-deserted Fanadik, several hundred miles north of Papua New Guinea.

For three days they remained stranded on the remote island, praying for rescue.

Then, on Thursday morning, crew aboard a US navy plane zipping through the sky spotted three men waving fluorescent orange life vests. They stood next to piles of palm fronds that spelled: H-E-L-P.

“This isn’t the set of Castaway ...” the US coast guard wrote in a statement detailing the rescue.

The rescuers immediately notified their families that the men had been found alive and well. They were then taken by a local boat to Pulap, the island from where the initially departed.

The coast guard were first notified that the men were missing at sea just before noon on Tuesday. They issued an urgent marine broadcast that enlisted the assistance of the navy and local vessels in the area of the skiff’s last known location.

Two large cargo ships that are a part of AMVER, a voluntary global ship reporting system sponsored by the US coast guard, diverted course and searched for a combined 17 hours, covering 178 miles of track line. A navy plane set out Thursday morning and two hours into their search, at 6am local time, they located the men.

“Our combined efforts coupled with the willingness of many different resources to come together and help, led to the successful rescue of these three men in a very remote part of the Pacific,” said Lt William White, a coast guard spokesman, in a statement .

After an introduction that included the theme to Gilligan’s Island, White told ABC News that the rescuers first spotted the island because of a fire the men had made. He said without the fire, it may have taken rescuers several more hours before they found the island.

The network reported that the men had been traveling to Micronesia to catch a flight when the boat capsized.

In the last two weeks, the coast guard’s 14th district, which patrols this region of the Pacific, have coordinated seven such search and rescue missions, saving the lives of 15 people and enlisting the help of 10 AMVER vessels and six aircrews.

“The coast guard 14th district covers an area of responsibility more than 12.2m square miles of land and sea, an area almost twice the size of Russia,” said Jennifer Conklin, search and rescue mission coordinator at the Coast Guard Command Center Honolulu, in the statement.

“Oftentimes, we are thousands of miles away from those who need help and because of that our partnerships with the navy, other search and rescue organizations, partner Pacific nations and AMVER are essential.” © Guardian News and Media 2016