The incident was reported on Woodfern Court in Dix Hills just after 10:30 a.m. on Friday morning.
Trevor Borders, 22, was doing a waterproofing job at a home and needed to dig a hole for access to the basement.
He tried to free himself when he started to sink, but fell waist-deep into the hole.
"The soil type in Dix Hills, it's very clay-based, which causes a very thick, viscous mud," Dix Hills Fire Department Capt. Scott DiPino said.
Nearly 50 rescue workers from six different agencies responded to help Borders. He was rescued just before 1 p.m. and was cold and wet but did not appear to be seriously injured.
Crews used a pulley and harness system to free the man before he was taken to to Good Samaritan Hospital Medical Center in West Islip for evaluation.
He’s ok! Nearly 2 and a half hours after becoming trapped in a collapsed hole of mud here on Woodfern Court in Dix Hills, this 22-year-old worker who came here on a waterproofing job, clearly had a MUCH busier day than he expected. #trenchrescue @DixHillsFD pic.twitter.com/D1DsDVcgtl— Stacey Sager (@staceysager7) October 19, 2018
* More Long Island news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube