More than 300 whales have escaped from a beach in New Zealand after becoming trapped on a shallow peninsula.

Two separate incidents at Farewell Spit, South Island, led to around 650 whales becoming stranded over the last few days.

The first, on 9 February, was the largest whale stranding on the mainland in New Zealand’s history, with around 400 whales becoming trapped.

Hundreds of volunteers flocked to the beach, helping to keep the whales cool and attempting to refloat them – succeeding in about 100 cases.

New Zealanders refloat 100 pilot whales

Another 200 whales which became stranded yesterday were able to refloat themselves overnight without the help of volunteers.

However, around 350 whales have died. Twenty were euthanized.

Volunteers are now cautiously optimistic the spate of strandings is over.

The Department of Conservation is now turning its attention to the disposal of the dead whales.

The beach has been closed off for fear of the decomposing animals blowing up.

“These things explode from the stomach and if you're standing right there it's not very nice getting a 'gut bomb' on your face," Department of Conservation operations manager Mike Ogle told Stuff.

Wildlife officials will use a variety of methods to dispose of the marine animals, including leaving some in sand dunes and others in the water.

SeaWorld's killer whales Show all 10 1 /10 SeaWorld's killer whales SeaWorld's killer whales Visitors are greeted by an Orca killer whale as they attend a show featuring the whales during a visit to the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales A trainer shows the crowd a killer whale during a show at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales An Orca killer whale is seen underwater at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Visitors get a close-up view of an Orca killer whale during a visit to the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Trainers have Orca killer whales perform for the crowd during a show at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Trainers have Orca killer whales perform for the crowd during a show at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Trainers have Orca killer whales perform for the crowd during a show at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Trainers have Orca killer whales perform for the crowd during a show at the animal theme park SeaWorld in San Diego, California March 19, 2014. A California lawmaker introduced a bill to ban live performances and captive breeding of killer whales in the state, a measure that would force the SeaWorld San Diego marine theme park to end is popular "Shamu" shows. Mike Blake/Reuters SeaWorld's killer whales Tillikum, a killer whale at SeaWorld amusement park, performs during the show "Believe" in Orlando, September 3, 2009. A killer whale at the SeaWorld amusement park in central Florida killed a trainer on February 24, 2010, police and company executives said. According to the Orlando Sentinel the orca involved in the incident, named Tillikum but popularly known as "Tilly," has a controversial past. Mathieu Belanger/Reuters SeaWorld's killer whales An unidentified trainer works with a killer whale during the "Believe" show at Sea World in Orlando, Florida, in this photograph taken on February 14, 2010. A killer whale at the SeaWorld amusement park in central Florida killed a trainer on February 24, 2010, police and company executives said. Picture taken February 14. Richard Baum/Reuters

The cause of the mass strandings will also be investigated.

"By taking biopsy samples and doing analyses, we're potentially able to isolate the reason for this,” DOC spokesman Herb Christophers told Radio NZ. “It could be as simple as interference with their navigation systems, but that's theoretical.”