More than 50 sperm whales emerged off the Southern California coast in an extremely rare, hours-long sighting that had whale watchers and scientists giddy with excitement.

Pods of mothers and juveniles rolled and played with dolphins Monday a few miles off Laguna Beach, the Orange County Register reported.

They later were spotted off San Diego and were heading south, said Jay Barlow, a sperm whale expert with the National Oceanic and Atmospheric Administration.

It's by far the largest group ever spotted so near to shore in Southern California, Barlow said Tuesday.

Others agreed.

"I've been counting whales and been on the water for 35 years. We've never had a large group like this ever," said Alisa Schulman-Janiger, director of the ACS/LA Gray Whale Census and Behavior Project.

The massive mammals were spread out over an area of up to 3 square miles and came within inches of boats as they poked their heads out of the waves, said David Anderson, who operates Captain Dave's Dolphin and Whale Safari sightseeing tours.

Sperm whales are the huge, toothed creatures mentioned in the novel "Moby Dick." They were hunted nearly to extinction for their oil in the 1800s.

The whales weigh up to 45 tons and eat about a ton of squid a day. They prefer to hunt in deep waters and can dive to 3,000 feet.

Why the sperm whales showed up remains a mystery.

Unlike toothless gray whales, which migrate down the California coast each year, sperm whales aren't frequent visitors.

Usually, only one or two adult males show up each summer or fall while large groups of females normally are found in warmer waters, Barlow said.

However, this year has seen a lot of warmer water close to shore, he said.

"The climate patterns have definitely been weird," Barlow said.

Other species that prefer warmer waters also have shown up this year, including pilot whales, false killer whales, and various species of tropical birds.

The sperm whales also might have been chasing food, Barlow said. "That's mostly what they think about."

Humboldt squid, which can weigh 60 pounds or more, have been turning up in the area for a decade.

"Could be they're catching on," Barlow said.

The whales also could simply have gotten confused by the complicated ocean terrain and "wandered in not intending to be here," he said.