A 17-year-old Virginia boy died Saturday when a sand dune collapsed at Cape Hatteras National Seashore in North Carolina, burying him under several feet of sand inside a hole that had been dug, officials said.

Rangers responded around 2 p.m. to a 911 call about a teenager trapped in a hole near the off-road vehicle ramp 49 in Frisco, the National Park Service said in a statement.

Family and friends had been looking for the teen when they found him buried in the hole and called for help, officials said. 

It appeared that portions of an adjacent sand dune collapsed into the hole, which was dug in a back-dune area behind the primary dune and not visible from the beachfront, according to the agency.

DENALI NATIONAL PARK EMPLOYEE DIES IN AVALANCHE

Dunes and ocean at Cape Hatteras National Seashore

Officials warned visitors of the dangers of digging deeps holes on the beach at Cape Hatteras National Seashore in North Carolina. (John Greim/LightRocket via Getty Images)

Rangers and family worked to dig the teen out from the sand while simultaneously performing CPR, officials said.

Dare County Emergency Medical Services personnel and Hatteras Island Ocean Rescue staff helped to bring the boy out from the hole and conduct life-saving measures.

Cape Hatteras National Seashore roadside sign

Cape Hatteras National Seashore is located in Frisco, North Carolina. On Saturday, a 17-year-old died after portions of a sand dune collapsed and buried him inside a hole that had been dug. (Jeffrey Greenberg/Universal Images Group via Getty Images)

First responders were unable to resuscitate the teen, who has not been publicly identified. The incident remains under investigation.

1 TEXAS CLIMBER DEAD, 1 RESCUED IN NATIONAL PARK WHERE ROCK CLIMBING IS BANNED

Authorities advised visitors of the dangers of digging holes on the beach following the teen’s death.

Dunes and ocean at Cape Hatteras National Seashore

The teen's death remains under investigation, the National Park Service said. (John Greim/LightRocket via Getty Images)

"Cape Hatteras National Seashore offers our condolences to his family and friends," said David Hallac, superintendent of the National Parks of Eastern North Carolina. "We urge visitors not to dig deep holes on the beach due to the danger they present to beachgoers and emergency response staff."

Cape Hatteras National Seashore is located on the Outer Banks, stretching more than 70 miles from South Nags Head to Ocracoke Inlet.

CLICK TO GET THE FOX NEWS APP

The seashore is popular for camping, fishing, off-road vehicles and other beach activities.