Heart-stopping footage has captured the moment officials and Good Samaritans raced against time to dig out a 16-year-old girl trapped in a deep sand hole. 

The dramatic incident occurred at Mission Beach in San Diego at about 4:50pm on Tuesday, just an hour before high-tide kicks in. 

Witnesses described the harrowing scene as the teenager found herself buried six to eight feet deep when the sand around her collapsed, leaving only her head and arms visible. 

'I was so scared for her because she was way down there,' Richard Mastan, one of the bystanders who joined the effort, told Fox5. 

The teen's friends started digging with no luck. After about 15 minutes, they flagged down the nearest lifeguards who called in a trench emergency alert, bringing in crews of officials.

The dramatic incident occurred at Mission Beach in San Diego at about 4:50pm on Tuesday, just an hour before high-tide kicks in

The dramatic incident occurred at Mission Beach in San Diego at about 4:50pm on Tuesday, just an hour before high-tide kicks in 

Witnesses described the harrowing scene as the teenager found herself buried 6 to 8 feet deep when the sand around her collapsed, leaving only her head and arms visible

Witnesses described the harrowing scene as the teenager found herself buried 6 to 8 feet deep when the sand around her collapsed, leaving only her head and arms visible

'We saw that she was buried up to her neck, we could only see her head and her arms sticking out,' said Lt. Jacob Magness from the San Diego Lifeguards to the outlet.   

The initial rescue attempt was unsuccessful, he said, so the joint digging effort had to begin. 

'Since I already had a shovel in my hand, they could see 'don't bother that guy, just let him keep digging,' so I was just digging like crazy,' said Mastan.

After an intense 20-minute operation, the teen emerged from the sand hole, appearing unharmed. 

Miraculously, the 16-year-old was not injured.Lifeguards escorted her to a stretcher before she was checked out by paramedics and released to her parents. 

After an intense 20-minute operation, the teen emerged from the sand hole, appearing remarkably uninjured. Lifeguards promptly assisted her to a stretcher and into a waiting paramedic truck for evaluation

After an intense 20-minute operation, the teen emerged from the sand hole, appearing remarkably uninjured. Lifeguards promptly assisted her to a stretcher and into a waiting paramedic truck for evaluation 

'Since I already had a shovel in my hand, they could see 'don't bother that guy, just let him keep digging,' so I was just digging like crazy,' said Good Samaritan Richard Mastan

'Since I already had a shovel in my hand, they could see 'don't bother that guy, just let him keep digging,' so I was just digging like crazy,' said Good Samaritan Richard Mastan

Locals highlighted the dangers of digging deep holes in the sand. 

'I was worried about the drowning, but apparently you've got to be worried about the sand too,' witness Michael Valasquez said to Fox 5. 

About three to five children die each year in the United States after a sand hole they are digging collapses on top of them, according to a 2007 study, with many others who get seriously injured. 

Witnesses expressed admiration for the quick response and teamwork displayed during the rescue. 

'Thank you for all the support that you guys have done for us, and we wish we could be like you guys more often,' witness Noah Gastelum said.