A team was performing a necropsy on a young humpback whale Friday to determine why the weakened mammal came ashore while warning that a dart used to sedate it had fallen into the surf and was missing.

Working against pounding waves along the exclusive East Hampton beach, the team of scientists, veterinarians and emergency responders were dismembering and disposing of the 30-foot carcass and performing forensics tests into Friday evening.

Baby Humpback Whale Beached in East Hampton

Rescuers fear he won't survive. (Published Tuesday, April 6, 2010)

The team hoped the necropsy would reveal whether the whale was suffering from a chronic health problem, said Trevor Spradlin, a marine mammal biologist with NOAA's National Marine Fisheries Service.

"By the time whales come into shore like this, usually they're in very bad shape," he added.

Dire Straits for Beached Whale on Long Island

A beached baby whale is in a desperate situation. Separated from its mother. Suffering from wounds. And fighting for its life. Greg Cergol has the latest from Long Island. (Published Tuesday, April 6, 2010)

The whale died early Friday after a third round of sedatives was administered and three gunshots were fired into its body, Spradlin said. The animal's death ended a four-day vigil that began Tuesday when the animal was spotted. Onlookers gathered throughout the week, taking pictures and saying prayers.

The whale's death came hours after a second attempt to euthanize the animal Thursday night using sedative-filled darts. Rescuers, unable to examine the whale closely because it was dark and raining, believed the animal died at about 2 a.m. Friday.

But as dawn broke, they noticed some signs of life. They waited for the new round of sedatives to take effect and then fired the gunshots to make sure they ended the animal's suffering quickly, Spradlin said.

"Everybody worked hard to do what was humane for this animal," he said, adding that the science behind how to handle marine mammals was still developing, complicating efforts to euthanize the whale safely and promptly.

Spradlin said the team was warning the public that one of four darts fired into the whale's body during Thursday's unsuccessful attempt to euthanize it had ricocheted into the surf and was still missing.

The nearly two-and-a-half-foot projectile was likely drained of sedative but could pose a danger if not handled properly, he said. They were asking the public to contact the local police if they found it.

The whale, less than a year old, was found Tuesday in the surf, already weakened and unable to free itself. Marine scientists said that if freed, it could not survive on its own.