A large sperm whale washed up along Nantucket’s north shore on Sunday, and marine mammal officials are racing to recover and learn more about the deceased cetacean.

Members of the Marine Mammal Alliance Nantucket (MMAN) inspected the carcass at low tide Sunday afternoon in several feet of water and determined it was a 40 to 50-foot male sperm whale. The cause of its death was not immediately known.

The MMAN volunteers were able to anchor the whale to shore before dark, but left the beach with concerns that it could refloat overnight and end up at another location, according to Kim Schulam, MMAN’s stranding coordinator. The group hopes to remove the carcass from the water and relocate it to an area where a necropsy (animal autopsy) can be performed.

“We initially thought it was a North Atlantic right whale, just because of the pectoral fins, but then when we got down there, and you could see the narrow jaw on the ventral side of it,” Schulam said. “So we got a rope around it, but we were not able to get it around the fluke because the bottom side of it was buried in the sand, and it was just too treacherous to try to dig under that with the waves coming in. But we do have it anchored, and hopefully it won’t refloat tonight, but we’ll be going down there first thing (Monday) morning. If it is still there, we have to figure out if we’re able to tow it out of the surf, and then probably have to relocate it somewhere else and do a necropsy, and then we’ll know more.”

The MMAN volunteers will be working with the National Oceanic and Atmospheric Administration (NOAA), the International Fund for Animal Welfare (IFAW), and the Massachusetts Environmental Police during the recovery effort.

It is the first sperm whale to wash ashore on Nantucket since June 2002, when a deceased sperm whale was discovered at The Galls near Great Point. It was towed by a tugboat to New Bedford, and its skeleton now hangs in the New Bedford Whaling Museum. On Nantucket, the more well-known sperm whale stranding occurred four years earlier on New Year’s Day in 1998, when a 46-foot male sperm whale washed ashore and died at Low Beach. Its skeleton now hangs in the Nantucket Historical Association’s Whaling Museum on Broad Street.

Asked if there were any obvious signs indicating what may have happened to cause the whale’s death, Schulam said. “Well, there was a gash on its back, and the head was pretty macerated, but it’s probably been floating for a while, so that could be tissue breakdown and scavenging. So it’s just really impossible to say at this point what it was. But if we’re able to get it out and then perform the necropsy, that’ll give us a lot more information.”

The MMAN and Schulam are urging the public to stay at least 300 feet away from the carcass and view it with binoculars. They are also reminding the community that it is illegal to take any parts of the carcass.