The 21-year-old Parisian man had buried himself up to his neck at a beach in Moliets, south western France.
It's understood that he buried himself in a hole that was around 2 metres deep and 3 metres wide, meaning there was a lot of loose sand around him.
However when he tried to get free, his wriggling only made matters worse and the sand packed tighter around him.
When other beach-goers tried to help, the sand packed so tightly around the man that he could hardly breathe any longer.
With the situation and the sand all the more unstable, a total of 20 beach-goers and nine lifeguards banded together to save the man, reported the France Bleu channel.
The makeshift team of rescuers formed a human chain to pull him to safety, with many of the rescuers flat on their stomachs to allow a distance between themselves and the loose sand.
Others pulled the ankles of those on the sand, while some used shovels to dig the man out, the channel reported.
As evening fell and after a 45 minute effort, the man was pulled to safety and given oxygen.
Local lifeguards warned about the need to fill in old holes made on the beach before heading home for the night.
One lifesaver told the channel that he had already witnessed two children dying after getting stuck in the sand over his years on the job, both of whom were crushed by the weight of the sand.