The 54-year-old man who died in the sea south of Auckland on Saturday as he tried to swim back to shore has been named.
He was Samuel Benjamin, of Manurewa.
Mr Benjamin set off from Kawakawa Bay on a small fishing boat with a friend early on Saturday morning heading towards Ponui Island, police said.
When they were some distance away from the ramp, the boat headed back to shore due to heavy seas.
On the return the boat ran out of fuel about 70 metres from the ramp and Mr Benjamin jumped into the water to swim ashore.
His friend followed him into the water after he saw Mr Benjamin was in trouble, police said.
A member of the public who saw the pair from land after they had been in the water for around 15 minutes alerted neighbours to call emergency services, before rushing into the water with another person to try to rescue the pair.
Unfortunately, after Mr Benjamin was pulled to shore he was pronounced dead at the scene by a paramedic. The second man was taken to hospital to be checked and has since been discharged.
Mr Benjamin was wearing a life jacket, but the second man was not.
Counties Manukau Police south area commander Inspector Jim Searle commended the actions of the two members of the public who helped the men in the water.
Their actions likely saved the second man's life, he said.
"With summer in full swing, we would like to reiterate the importance of being aware of your limits in the water and having adequate safety equipment on board your boat,'' Mr Searle said.
"Every year, a number of lives can be saved if people are adequately prepared for the water conditions, and often simply by wearing a life jacket. There's no excuse for going out fishing or boating without enough safety equipment for everyone on board.''
Every person on board any pleasure craft should be wearing a properly-fitted life jacket, Mr Searle said.