A moment when a shark researcher from Massachusetts was almost bitten by the very subject of his research was captured in a rare video.

In the video, Greg Skomal, who was tasked with researching sharks for the nonprofit Atlantic White Shark Conservancy, was seen standing at the end of the pulpit on the boat’s bow, holding a GoPro camera fastened to the end of a long pole, when the aquatic predator leapt out of the water, just below the railing, with its mouth wide open. It snapped at the researcher’s feet before diving back into the waters. Luckily the shark missed its target by inches.

“The shark came out of the water and I was looking down into the mouth of the shark,” Skomal told the Boston Herald. “It did rattle me a little bit to see this thing lunging up at me. I could clearly see its teeth and its gaping mouth.”

Regarding the video, the conservancy said in a statement: “While encounters like this one are rare, this video shows that they’re certainly possible.”

The captain of the 26-foot boat Aleutian Dream, which was carrying Skomal, had already warned the latter of a possible shark sighting a little ahead. But the warning did nothing to prepare the researcher for the haunting encounter.

“Out of the corner of my eye, I saw some commotion and I looked straight down. I was looking down into the mouth of the shark because it was wide open,” he said.

Although Skomal was seen shifting a little on the pulpit immediately after the shark’s attempted attack, he said he was sure of the fact that he was in no danger during the encounter.

“I knew that that shark couldn’t get to me,” Skomal said. “I have a very strong pulpit between me and it. I don’t think I was really worried about my safety but the shark was coming up out of the water. It happened all so quickly. I didn’t have too much time to react.”

Nevertheless, Skomal thanked his lucky stars that the shark’s breach out of the water was a short one. “If the shark had come much higher, or had come from the side it would have been a different story,” Skomal said. “They certainly have the ability to breach much higher out of the water.”

As to why the shark chose to leap out of the waters, Skomal said was very difficult to tell. "We’ll never know what was going on in the mind of the shark,” Skomal said.

Some of the possible reasons could be that the shark was startled by the boat on the surface and was making an effort to get out of the way, or it might actually be planning to make a feast out of Skomal.

Great White Shark A moment when a shark researcher was almost bitten by the very subject of his research was captured in a rare video. In this photo, a Great White Shark is attracted by a lure on the "Shark Lady Adventure Tour" in Gansbaai, South Africa, Oct. 19, 2009. Photo: Getty Images/ Dan Kitwood