Four beaches near Auckland will remain closed until Friday after a man was killed by a shark estimated to be about four metres long.
The man, who was in his 40s, had been swimming off the coast when the attack happened at Maori Bay, south of Muriwai Beach.
He has not been formally named by police, but people in Muriwai say he lived in the area with his wife and two children.
Three lifeguards raced to help the man when the alarm was raised at 1.30pm on Wednesday and a second boat with a police officer arrived about 30 minutes later.
Inspector Shawn Rutene said the officer tried to distract the shark and took a firearm with him. Mr Rutene said several shots were fired before the shark rolled off and disappeared. It is not know if the shark was hit.
The Westpac rescue helicopter was also involved in the operation and flew low over the shark in an attempt to get it away from the man, while surf lifesavers in an inflatable rescue boat (IRB) also tried to distract it.
Senior paramedic Russell Clark told Radio New Zealand's Checkpoint programme on Wednesday he could only make out a single shark from the helicopter.
"I just saw one shark about 12 feet in length circling around him at the time with surf club in the water and an IRB trying to distract the shark away from the person."
Police believe the shark was a Great White, which Tim Jago from Muriwai Volunteer Lifeguard Service said was extremely unusual to find in waters around Muriwai.
"They're pretty rare out here. You get smaller sharks, there's no denying they're there. But this is one out of the hat for us. I don't think anyone's seen anything this big at this beach ever."
More than 200 school pupils were told to leave the beach on Wednesday afternoon.
Glen Eden Intermediate principal Terry Hewetson said some pupils aged 12 and 13 were swimming about 1km away from the attack when a beach education worker told a teacher they needed to go.
Avondale College also had about 150 students at the beach for a geography field trip and its principal said he does not think any saw the attack.
Authorities have closed four beaches from Manukau Harbour to Muriwai for at least two days while they hunt for the shark.
Marine conservationist Christine Rose said sharks are often spotted in the area, but rarely attack people. Ms Rose, from the Muriwai Environmental Action Group, believed Muriwai Road was more dangerous than the water and bait thrown in by people fishing might have attracted the shark.
The last confirmed death by a shark in New Zealand was in 1976. A kayaker was mauled by a great white in the Coromandel in 2006, but it is not known whether he drowned before the shark attacked him. There have been 15 fatal attacks since 1837.