A federally endangered 42-foot fin whale calf grounded alive on Stinson Beach, but ended up dying Monday morning as people rushed to its aid.

"It's rare for a live whale to strand on a beach," said Dr. Shawn Johnson, director of veterinary science at the Marine Mammal Center, soon after pronouncing the whale dead to disappointed onlookers. "It probably got separated from its mother recently."

Dozens of people gathered on the northern end of the beach near the community of Seadrift after it was spotted at 7 a.m. The whale — believed to be a male — likely came ashore sometime Sunday night, Johnson said.

Once spotted, the whale remained alive for more than two hours as county and local fire and law enforcement officials arrived at the scene and put up tape and cones to keep people back.

Marine Mammal Center workers arrived later and Johnson went to check on the condition of the whale.

"When these live whales strand it is very serious and it's not like we can put them back into water," Johnson said. "And they are too big to rehab."

Once a whale strands on land its own weight can serve to crush crucial organs.

The Marine Mammal center's veterinary team performed a necropsy Monday afternoon. Once the whale was rolled over, the team discovered trauma to the sternum area and internal hemorrhaging around the heart. In addition, air was present in the subcutaneous tissue — tissue between the muscle and fat — indicative of trauma.

There were no broken bones discovered. A cause of death, however, could not be determined.The whale will likely be buried at the beach to decompose.

It was the second fin whale to turn up on Marin shores in the past couple years. In June 2012 a 47-foot-long fin whale washed up south of Wildcat Beach in the Point Reyes National Seashore. A team of biologists concluded the whale had been killed after being hit by a ship.

A fin whale that also had been hit by a ship washed up on San Francisco's Ocean Beach in fall 2010.

Fin whales are the second-largest mammal on Earth, behind the blue whale. Females average 61 feet and males are slightly smaller at an average 59 feet, but can attain lengths of nearly 90 feet.

They are the fastest of all large whales, reaching speeds of 25 mph. The fin whale is a filter-feeder, feeding on small schooling fish, squid and crustaceans, including krill. It forages along the continental shelf break and the outer continental shelf but may venture near shore at land promontories such as Point Reyes.

Fin whales are listed as endangered under the Endangered Species Act. They generally roam the world. Fin whales are divided into several populations worldwide and the population that occurs from Washington to California is estimated to be about 2,000 individuals, scientists say.

Several endangered whale species have been feeding off the north-central California coast in recent weeks, including blue, humpback and gray whales. The abundance of krill — small shrimp-like crustaceans — has attracted them.

"It's pretty impressive that a small whale is that big," said Molly Pikkarainen, a retired schoolteacher from Fairfax, who watched the whale roll in the surf. "It's sad when this happens."