A hiker who became stuck in quicksand at a Utah national park is lucky to be alive after a harrowing two-day rescue operation.

A 34-year-old Arizona man was hiking with a companion in Zion National Park when he suddenly found himself stuck in knee-deep quicksand on Saturday afternoon.

According to Zion National Park, the man and his friend attempted to free the hiker’s leg from the quicksand but had no luck. That’s when the man’s hiking companion decided to hike herself out of the woods to call for help. The woman left her friend with warm clothing and gear and took off in search of cellphone reception. It wasn’t until about three hours later the woman was able to call 911.

READ MORE: Widow and mother of 5 dies in California house fire trying to save kids

“Zion Search and Rescue team immediately assembled and began hiking to locate the male,” the national park said in a statement. “Rangers located the companion close to the trailhead and tended to her as she was exhibiting signs of hypothermia, from hiking the three hours to call for help.”

Story continues below advertisement

It took several hours before rescuers located the stuck hiker who was found “suffering from exposure, hypothermia, and extremity injuries.”

Authorities said first responders tried for two hours to free the hiker’s leg from the quicksand. It wasn’t until late Saturday night when they were able to free the man from the quicksand, but they had to stay overnight at the location after a snowstorm moved in.

According to Zion National Park, a helicopter was dispatched the next morning, but the weather prevented the chopper from reaching the area until Sunday afternoon.

Battling heavy winds, rescuers were able to pluck the hiker, later identified as Ryan Osmun, from the river in the park, and the man was taken to hospital.

In an interview with ABC 15 News on Tuesday, Osmun said he thought he was going to lose his leg as result of getting stuck in the quicksand.

READ MORE: Firefighters revive unresponsive dog with CPR after pooch pulled from house fire

“I thought for sure when she left that I would lose my leg,” Osmun said, recalling the moment his girlfriend Jessika McNeill went for help. “It was pouring snow. That’s when I tucked my arms into my jacket, pulled my beanie over my face, and just put my face in my jacket. It was the only way to keep warm, the upper half of my body.”

Story continues below advertisement

McNeill said his leg wouldn’t budge from the grips of the sand.

“I tried digging and that wasn’t working, obviously — and we did try a couple sticks to try and… put a space between the sand and his leg and we couldn’t do it,” McNeill said.

The rescue team told Osmun he was lucky to be alive.

“When he walked up, he said, ‘I’ll be honest with you, you should be dead or unconscious right now,’” Osmun recalled.

Osmun is expected to make a full recovery.