The incident happened when lifeguard Rob Howes took his 15-year-old daughter Niccy and two of her friends swimming near the town of Whangarei, according to the Northern Advocate newspaper.

Mr Howes told the newspaper that the dolphins "started to herd us up, they pushed all four of us together by doing tight circles around us". He explained that, when he had attempted to break away from the protective group, two of the bigger dolphins herded him back.

He then saw what he described as a three-metre great white shark cruising toward them - but it appeared to be repelled by the ring of dolphins and swam away.

"It was only about two metres away from me, the water was crystal clear, and it was as clear as the nose on my face," he said. At that point, he realised that the dolphins "had corralled us up to protect us".

Another lifeguard, Matt Fleet, who was on patrol in a lifeboat, saw the dolphins circling the swimmers and slapping their tails on the water to keep them in place. He told the newspaper he also had a clear sighting of the shark.

"Some of the people later on the beach tried to tell me it was just another dolphin - but I knew what I saw," he said.

Expert Ingrid Visser, who has been studying marine mammals for 14 years, told the Northern Advocate that there had been reports from around the world about dolphins protecting swimmers.

She said that, in this case, the dolphins probably sensed the humans were in danger and took action to protect them.

Ms Visser, of the group Orca Research, said dolphins would attack sharks to protect themselves and their young.