Emergency workers and volunteers on the scene at Francis State Beach. (Dean Coppola/AP)

This week, a 26-year-old man died on a Northern California beach.

Adam Jay Pye wasn’t caught in a rip current or attacked by a great white in the Pacific, though. He was digging in the sand, tunneling down deep, when the hole collapsed around him.

“The sand had just engulfed this young man — he was standing up straight, like a soldier with his hands to his sides,” one witness to the rescue effort told the San Jose Mercury News. “He was buried alive. He was buried alive in that hole that he dug.”

Accidents like Pye’s happen a lot more often than you’d think. A few examples:

August 2000: A 13-year-old was killed when the hole he was digging with friends at a Massachusetts beach club collapsed. “Firefighters said the hole was several feet wide, but it collapsed so uniformly Tuesday night that the beach appeared nearly flat afterward,” a news report on the death read.

May 2001: A 17-year-old at a beach party fell into a hole on a Rhode Island beach. The hole collapsed, killing him.

August 2008: A 16-year-old playing on a beach in Wales died when a tunnel dug in the dunes collapsed. “The young man was some five feet below the surface and although rescue crews had managed to clear the sand from his head and shoulders the youth was compressed under a considerable weight of sand,” a fire service spokeswoman told the BBC.

August 2011: A teenager was pulled from the sand by rescue crews after being buried alive in Southern California, according to the L.A. Times. The teen survived the incident.

July 2012: A 12-year-old New Jersey boy was killed when the tunnel he was digging on a beach collapsed. The trench was less than three feet deep, authorities said.

June 2014: A 49-year-old man vacationing with his fiance and her family died in a tunnel connecting two holes on an Outer Banks beach, according to reports.

(Looking deeper in the archives, in September 1914, the New York Times reported that six children — five girls and a boy — were killed in a sandbank collapse in Schenectady. “A kitten protected from the sand by the body of one girl was taken out unconscious and soon revived,” The Times reported.)

Bradley Maron, an assistant professor of medicine at Harvard Medical School, remembers another case. It happened years ago, when Maron was a Martha’s Vineyard lifeguard. A little girl fell into a hole on the beach one day, Maron said, and the scene that followed was frantic.

“It was chaos,” Maron recalled this week. “There was a moment where people really did not know what to do, what was really happening.”

Maron eventually became a doctor and started tracking cases of sand-related incidents from newspaper clips and articles online. He recorded 52 cases — both fatal and non-fatal — the majority of which had occurred in a 10-year span. That’s according to a letter Maron wrote to the New England Journal of Medicine in 2007, explaining his findings.

“The risk of this event is enormously deceptive because of its association with relaxed recreational settings not generally regarded as hazardous,” Maron wrote. “However, we believe these personal and family tragedies probably are more common than this report suggests.”

The count continued, even after the letter was published. There have been about 25 more sand-deaths since its publication, Maron told The Post, and those are just the ones that were documented in news reports.

“They’re not freak accidents,” he said in a phone interview. “We, using only the Internet, have been able to characterize a substantial number.”

Most people see hazards in the water, not in the sand. But as ABC News noted:

Sand’s crumbling, shifting nature contributes to the hazards of cave-ins. Victims such as Pye have been covered in seconds, the sand making it difficult to breathe.

The girl in Martha’s Vineyard? She lived, thanks to a lifeguard who located her body quickly and was able to create an air pocket in the sand, which helped her breathe while the rescue effort continued, Maron said.

“That was a save,” he said. The girl was pulled from the sand and evaluated at a hospital, he said.

He was told that on her 18th birthday, she returned to the island.

He added: “Others, of course, have not been so fortunate.”