Two boaties were rescued from the water off Auckland's Princes Wharf on Saturday - one of whom had clung to a capsized dinghy for three hours.
An ex-paramedic treated the man for hypothermia.
The skipper of the Fullers vessel Kekeno initially noticed something red in the water 200m off the end of Princes Wharf on Saturday morning.
"A closer look revealed it was a man holding onto a red fuel container," Auckland Maritime Unit Senior Constable Steve Phillips said.
The skipper then noticed the submerged bow of an aluminium dinghy about 150m away with a second man clinging to it.
Crew from the Kekeno rescued the first man and raised the alarm about the second man.
The nearby Fullers ferry Tiger Cat went to the aid of the man clinging to the dinghy.
Both men were transported to Queens Wharf before being taken to Auckland Hospital.
"The skipper of the capsized dinghy explained they had been in the water for about three hours before they were located," Phillips said.
"Both had life jackets on and were very lucky to have been spotted by Fullers, who acted extremely swiftly."
Mark Trubuhovich, who was on the Kekeno sailing from Waiheke to Auckland said the pair were spotted in the water at 11.45am.
"At first I thought it was just a practice drill, but as we got closer I realised it was real," he said.
"We were about 200m from the harbour, and he was holding on to what looked like a fuel tank. It was also fortunate he was wearing a life jacket."
Trubuhovich, an ex-paramedic, said the man was suffering hypothermia and he helped with support treatment.
"We stabilised the man until docking at Pier 11 where he was handed over to the ambulance and taken to Auckland Hospital," Trubuhovich said.
"I don't know how long he had been in the water, but another 10 minutes and the outcome could have been pretty different."
The pair's boat was initially towed by the Auckland Harbourmaster to Westhaven Marina but has since been taken to the Police Maritime Unit base.
Police are expecting to speak with the pair further tomorrow to understand what happened and to organise the return of the dinghy.