Cook posted the footage on his TikTok account, @joedigger, where it was viewed more than two million times.

According to News4JAX, the plane experienced engine failure, and Cook said in a second video that the pilot was surveying the damage from Hurricane Nicole.

Richard McSpadden Jr., the senior vice president of the Aircraft Owners and Pilots Association, told Newsweek that engine failure does not happen very often, but all pilots are taught how to address such a situation.

Not only do pilots have to demonstrate that they can handle an engine failure to get their license, but they also must be tested on those skills every few years. McSpadden said planes go through an annual inspection and have a preflight inspection to examine the engine and the quality of the fuel.

When such an emergency takes place, it is vital to take others into account.

“You don’t make your emergency someone else’s emergency,” McSpadden said. “You move to a place you can limit the potential damage to other people. That’s why it’s rare for someone on the ground to be impacted by an aviation accident.”

He said pilots need about 1,000 to 2,000 feet of open space to safely land a plane in the event of an emergency.

Cook opens his video with the camera pointed at the ground as he is digging through the sand.

He spotted the plane as it crashed into the water and immediately began sprinting toward the aircraft.

“Are you OK?” Cook yelled out to the pilot, who had already gotten out of the plane and was surrounded by other people on the beach.

The plane was upside down, but the pilot assured him he was unharmed. Police with the St. Augustine Police Department said in a Facebook post that the pilot was not injured.

“The plane crashed literally while I was on the beach digging,” Cook wrote to Newsweek. “I heard it and saw it flip over.”

He said that his initial thought was to run over to help the pilot because they were in the water.

Officials with the state park were the first to respond before the police arrived. A tractor was used to remove the plane from the beach.

Cook said the plane’s front nose and the propellor were badly bent.

“Looking back I find myself extremely lucky because the pilot said he hit the water because of pedestrians,” he said. “I had my back turned at the exact moment of impact and turned to see it flip over.”

He did not hear the plane coming down until it landed in the water.

Viewers took to the comments section to share their thoughts on the video.

“Metal detecting is crazy, bro found a whole plane in the sand,” a viewer commented.

“That’s gotta be your biggest find yet, right?” another asked.

Emergency landings are uncommon, but not unheard of.

Almost a year ago, a commercial flight from New York to Israel made an emergency landing due to a malfunction “out of an abundance of caution.”

Around that same time, one pilot was forced to deploy his aircraft’s parachute as he landed in a tree.

In April of this year, a small airplane crash-landed onto a homeowner’s lawn in New Jersey.