A 20-year-old man had to be rescued from a cave in upstate New York.

If you spend time hiking on any of the numerous trails across New York it's probably a good idea to avoid going into any caves you might come across because it could end up being a situation you aren't able to get yourself out of.

New York Cave Rescue
Onesquethaw Volunteer Fire Company/Facebook
loading...

Man Stuck in Upstate New York Cave for Hours

It appears that is exactly what happened to a 20-year-old hiker over the weekend leading to multiple emergency crews spending hours trying to get him out safely according to WTEN. The unidentified 20-year-old man from Queensbury, New York along with a group of friends entered the Clarksville cave, and as the friends got out the 20-year-old got stuck trying to exit according to Albany County Sheriff Craig Apple.

New York Cave Rescue
Onesquethaw Volunteer Fire Company/Facebook
loading...

Pulley Systems Used in New York Cave Rescue

Apple told News 10 that crews from the Albany County Sheriff’s Office search and rescue team assisted the Onesquethaw Fire, New York State Fire, and Slingerlands Rescue, worked for hours to save the man from the cave using a variety of pulley systems that were assembled to help free the hiker. Apple said the entire process took five hours and the man escaped with very minor injuries.

SEE ALSO: Equipment Gets 'Wedged' Under Overpass in Middletown, New York

The folks at Onesquethaw Volunteer Fire Company shared pictures of the rescue on its Facebook page and thanked all of its neighboring companies and those that helped with this call including several members from the cave conservancy and local cavers,

"We are glad that the rescue ended with the safe recovery of the trapped individual."

The Clarksville Cave, which is a horizontal cave system with 4,800 feet of passage and three entrances according to Wikipedia was temporarily closed while the preserve manager cleared it.

Firefighter Rescue Man Trapped in New York Mine

Brewster Fire Department

Gallery Credit: CJ

New York Man Trapped on Top of Car in Hudson Valley Stream

SUV stuck in a flooded stream in Dutchess County.

More From WZAD-WCZX The Wolf