Two New Zealand sailors and their skipper were rescued from a liferaft far offshore after their sailboat caught fire just after midnight on Wednesday.

The United States registered 50-foot yacht named Sunny Deck was travelling to the island of Tonga when a fire in the engine compartment engulfed the yacht.

The 36-year-old skipper was on watch, and the two other sailors, aged 67 and 70, were asleep at the time. The crew had no time to dress or grab any equipment before abandoning the vessel to a liferaft, but the skipper managed to reach the EPIRB — fire had already melted the lanyard attaching it to the vessel, according to a report by the Rescue Coordination Centre New Zealand.

Sunny Deck was on its way from Acupulco, Mexico, to Auckland when it caught fire about halfway between Rarotonga and Tonga.

On board were owner Murray Vereker-Bindon, 70, and crewman Michael Boyd, 68, from Hamilton, and Victor Campos, a 35-year-old professional skipper from Mexico.

Vereker-Bindon’s son Andrew Bindon told the Herald his father purchased the yacht last year.

Sailing it from Mexico, where he lives with his wife Yolanda, home to New Zealand was his dream.

“It was a bucket list trip,” Andrew Bindon told the New Zealand Herald.