Michael Packard, 56, had been a commercial lobster diver in Provincetown, Massachusetts, for 40 years and was frequently going lobster diving off the shore of Cape Cod.

Last Friday morning when he felt a big bump, and everything went dark, according to him. After the incident, Packard told WBZ-TV as he realized, oh my god, he was in the mouth of a whale… and it was trying to swallow him.

Michael Packard, from Wellfleet in the US state of Massachusetts, wrote on Facebook he was lobster diving on Friday before he found himself inside the mouth of a whale.

“I was in his closed mouth for about 30 to 40 seconds before he rose to the surface and spit me out. I am very bruised up but have no broken bones,” the 56-year-old wrote.

A relieved Packard told Cape Cod Times he “felt this huge shove” before everything “went completely black,” then reality set in as he became aware he was inside the mouth of a whale.

“I thought to myself, ‘there’s no way I’m getting out of here. I’m done, I’m dead’,” he said, reports the outlet.

Packard, an experienced diver, started to think about his wife and his 12 and 15-year-old sons and began to struggle inside the beast’s mouth until he said he saw a light and the whale started shaking his head side-to-side. Packard was saved by his crewmate Josiah Mayo, who was on their boat ‘The J n’ J.’

Mayo watched in amazement as the water beside the boat erupted as the whale emerged—and Packard flew out of the mammal’s mouth.

According to the Cape Cod Times, he lifted Packard out of the water and used his walkie-talkie to call authorities ashore. Packard initially thought he had broken his leg in the incident, but doctors later told him he had only soft tissue damage and bruising, and he was discharged the same day.

Packard thanked the Provincetown rescue crew for their “concern and aid” in a later Facebook post.

According to Joke Robbins, Director of Humpback Whale Research at the Coastal Research Center, when a humpback whale ate, it swallowed and opened its mouth wide open. The humpback whale was looking for a bite of sand lance fish, which could be found off the shore of Cape Cod.

However, they warned divers to stay at least 100 feet away from powerful animals because even an accidental brush with them could be hazardous—as Packard has discovered. Still, thankfully he lived to tell the tale.