Two people have been rescued after a terrifying night at sea as six-meter (20-foot) waves tossed their stricken yacht nearly 200 miles (322 kilometers) off Australia’s eastern coast as they drifted at speed towards New Zealand.

Authorities were first alerted to the crew’s crisis around 1pm on Monday, when they deployed a distress beacon, but it was hours before the first rescue helicopters located the vessel.

The 20-meter yacht, the Spirit of Mateship, had lost power and communications and was being hit by winds of up to 90 kilometers an hour (56 mph) as well as waves up to six meters high.

“(The helicopter’s crew) were able to fly above the yacht, and they could communicate via radio to the yacht, but they were unable to pick them up,” said Ben Flight, duty manager at the Australian Maritime Safety Authority Response Center.

Another rescue attempt was later abandoned due to rough seas, forcing the two people – a man, 60, and woman, 48 – to spend what Flight described as a “horrible” night at sea.

“They weren’t injured, but the vessel had suffered a mechanical issue of some kind, and they couldn’t steer, and they couldn’t make their own way through the water, so they were drifting, and they were taking on water as well. So, they were in quite a serious situation,” said Flight.

“They were sort of just at the mercy of the elements. They would have been moving around quite uncomfortably. It would have been particularly windy, noisy, probably quite wet as well.”

Two Australian Navy ships – HMAS Arunta and HMAS Canberra – answered calls for help, as well as Royal Australian Air Force C-130J Hercules aircraft, according to the Australian Defence Force (ADF).

The ships, along with a nearby merchant vessel, monitored the yacht’s location overnight, and the rescue resumed in the early hours of the morning, when conditions had eased.

NSW Police vessel Nemesis arrived at the yacht about 3 a.m. Tuesday and deployed a smaller boat to rescue the sailors around 7:30 a.m. in choppy seas with swells of four meters to five meters.

“I don’t imagine they would have got any rest overnight, so I imagine they’d be quite tired and very relieved to be rescued,” Flight said.

Flight said the outcome would have been much worse if the crew hadn’t deployed the distress beacon, which issues a satellite alert to advise the rescue coordination center of their location.

The Spirit of Mateship has competed in the prestigious Sydney to Hobart yacht race several times, crewed by wounded veterans and army personnel.

Together they raised money to support army veterans. However, the yacht has changed hands since then, according to Flight.

The rescued sailors are expected to arrive back in Sydney Tuesday night after a 12-hour voyage.

This post appeared first on cnn.com