He might not have eyes on opposite sides of his head and might not pair well with saltine crackers, but Shawn Stamback knows exactly how it feels to be a sardine.

The diver was nearly swallowed up like one during a recent whale feeding off the coast of California -- an amazing encounter that was caught on video and has garnered 6.2 million views to date.

Stamback and his scuba diving partner, Francis Antigua, were swimming near their boat on July 20, hoping to observe some feeding whales from afar.

“The reason we got in the water was to see if we could hear the whales singing,” Stamback told ABC News.

Suddenly, the pair found themselves surrounded by sardines. Hundreds of them.

And they seemed to be in a panic.

“Before we know it, there’s all these bait fish just coming straight up in your face,” Stamback said. “The first thing that came to mind was, ‘Oh, there's a predator down there chasing them.'"

Before the divers had a chance to react, two humpback whales breached the surface, gobbling up as many of the little fish as they could in giant gulps.

“All of a sudden (the sardines) just rushed all to the surface and two humpback whales go right behind them, chasing them all the way to the surface,” Stamback said.

The whales – which can weigh up to 40 tonnes -- came so close that the men could have been swallowed.

“I worked my way up to the boat, got up on the back of it as soon as I could,” Stamback said. “The other guys said they've never seen me swim that fast before and I can see why now that I've watched the video."

The near miss doesn’t surprise Caitlin Birdsall, a whale expert from the Vancouver Aquarium.

Summer is typically prime feeding time for humpbacks, she said, noting the whales prefer small fish to scuba divers.

However, they often “don’t appear to be entirely aware of their surroundings,” Birdsall said of the marine mammals.

“It’s a good idea that if you suspect these animals might be feeding in the area to not be in the water.”

Stamback isn’t likely to make that mistake again.

“The mental sensation was almost like you've escaped death,” he said.