Media playback is unsupported on your device Media caption One volunteer said "people from all over the world" were helping to try to save the whales

Volunteers in New Zealand are racing to rescue survivors after more than 400 pilot whales beached themselves.

About 300 stranded whales died overnight at Farewell Spit, on the South Island, in one of the worst such cases the country has seen.

Hundreds of locals and conservation officers have been trying to rescue the survivors since early Friday and formed a human chain to refloat the whales.

Scientists do not know what exactly causes whales to beach themselves.

But it sometimes happens because the whales are old and sick, injured, or make navigational errors particularly along gentle sloping beaches.

Sometimes when one whale is beached, it will send out a distress signal attracting other members of its pod, who then also get stranded by a receding tide.

Are whales attempting suicide when they strand themselves?

Image copyright AP Image caption The stranding is one of the worst the country has seen

Image copyright Reuters Image caption Volunteers have been trying to refloat the surviving whales

The conservation department said it had received a report about a possible stranding on Thursday night, but did not launch the rescue operation until Friday morning as it was too dangerous to attempt a rescue in the dark, reported the New Zealand Herald.

You might also be interested in:

The park that shoots people to protect rhinos

Should I worry about arsenic in my rice?

What really happened when Swedes tried six-hour days?

Andrew Lamason, the departments regional manager, said it was one of the largest mass beachings recorded in New Zealand.

New Zealand marine mammal charity Project Jonah which is leading efforts to save the whales said a total of 416 whales were stranded.

It said the surviving whales are "being kept cool, calm and comfortable" by medics and members of the public.

Some of the refloated whales tried to swim back to shore, and the human chain was trying to herd them out to deeper waters, said volunteer Ana Wiles.

Image copyright Reuters Image caption Farewell Spit often sees whale strandings

She told news outlet Stuff that there were "so many fins in the air, no breathing".

"We managed to float quite a few whales off and there were an awful lot of dead ones in the shallows so it was really, really sad."

"One of the nicest things was we managed to float off a couple [of whales] and they had babies and the babies were following," Ms Wiles added.

New Zealand has one of the highest stranding rates in the world, with about 300 dolphins and whales ending up on beaches every year, according to Project Jonah.

Many of these incidents happen at Farewell Spit. Experts say its shallow waters seems to confuse whales and hinder their ability to navigate.

Danny Glover, one of the rescuers at the site, told the BBC it was known as a "whale trap", with its incredible tidal range where the tide may come in as far as 5km (3miles) but with only a 3-metre drop in depth.

In February 2015 about 200 whales beached themselves at the same location, of which at least half died.