A pregnant pygmy sperm whale was euthanized after washing up in shallow waters off Cape Cod, marine experts said Monday.

Experts were investigating whether the 870-pound animal, which was almost full term when it came ashore at West Dennis Beach early Sunday, was ill or experiencing pregnancy complications and unable to swim away.

Pygmy sperm whales normally swim in deep water, so to see one near the coast is rare, said Bridget Cabral, a stranding technician with the Cape Cod Stranding Network who participated in a necropsy, or animal autopsy, on the whale.

"They are very deep sea divers. There's something wrong with it," she said.

There is no accurate count of the pygmy sperm whale population because they are such deep sea animals, but they are not considered endangered, according to the American Cetacean Society.