Officials say four people aboard a stranded, storm-battered sailboat off Nova Scotia have been rescued.

Joint Task Force Atlantic tweeted Monday night that the four crew members were hoisted into a Royal Canadian Air Force helicopter and flown safely to Halifax.

The rescue in rough seas took all day and involved two Royal Canadian Navy ships that were heading home.

Capt. Wayne Jarvis, air co-ordinator with the Joint Rescue Co-ordination Centre in Halifax, had said earlier that the U.K.-registered vessel Makena was about 240 nautical miles southeast of Halifax.

He said the 15-metre sailboat had been beaten up in the stormy seas, and at 6 p.m. AT was in the "storm centre" with winds up to 50 knots causing high seas.

A photo tweeted by the task force appeared to show the vessel with a torn jib flapping in the wind, although the mainsail looked to be stowed.

An earlier tweet said the sailboat was "disabled."

Before the rescue, a number of other organizations assisted in the search for the sailboat, including a Cormorant helicopter from 14 Wing Greenwood, a U.S. Coast Guard aircraft and a nearby bulk carrier.

It was a long search that took the better part of the day, but in the end, the Makena crew was found. HMCS Glace Bay and HMCS Summerside were first on the scene. They were heading back to Halifax after a deployment in Europe when they veered off course to aid in the rescue. They stayed with the small vessel until the helicopter arrived. Seas were rough at the time, so the four couldn't be safely transferred onto the ships.

The Cormorant helicopter refuelled at an offshore oil platform before it arrived on the site of the rescue.

It took about an hour to hoist all four crew members onboard the helicopter. The Cormorant refueled once more before it headed toward 12 Wing Shearwater, arriving around 8 p.m.

When the sailors arrived in Shearwater, they were transferred to the Canada Border Services Agency for so-called “consular assistance.” There were no reported injuries or illnesses.

With files from CTV Atlantic’s Amanda Debison and The Canadian Press.