Discuss as:

'Convinced I was going to die': Man survives 4 days in tunnel with broken leg

A homeless man who survived being trapped four days in a Utah drainage tunnel with a badly broken leg says he’s relieved he made it out alive but regrets “a serious lack of judgment” that got him into his predicament.

“I’ll never do that again,” Daniel Samuelsen, 33, said Sunday from his hospital bed in Salt Lake City, where he was being treated for a compound fracture in his lower right leg and severe dehydration. Doctors at St. Mark’s Hospital have told Samuelsen his fracture is so severe, he could lose his right leg.

Samuelsen told local media he fell into the tunnel, near the mouth of Parleys Canyon in the foothill east of Salt Lake City, after taking a detour on a hike on Wednesday. He and a friend hiked to a segment of pipe that slopes uphill from the Bonneville Shoreline Trail.

The pipe led into a series of underground drain tunnels that open out on the other side of the highway.

Samuelsen thought it would be a good idea to explore the “shortcut.” His friend wasn’t convinced and left.

Samuelsen says he’d crossed the drainage pipe before using a rope, but this time there was no rope.

"That was a serious lack of judgment,” Samuelsen said of his decision to continue.

Samuelsen crawled inside the pipe and slipped. Suddenly he was on his back, sliding down, “faster, faster, faster, faster, then boom!" he told the Salt Lake Tribune.

Watch the most-viewed videos on NBCNews.com

He wound up about 50 feet below the opening, his right leg smashed and a broken bone protruding from the skin.

Samuelsen, who lives in a homeless shelter and works as an independent taxi driver, said he screamed for help for hours. But though he could hear dozens of bicyclists and walkers coming and going just a few feet overhead on the trail, his pleas were drowned out by the nearby freeway traffic, he told the Tribune.

By Friday, as dehydration, hunger and injury further weakened him, “I was pretty convinced I was going to die,” he said.

Stay informed with the latest headlines; sign up for our newsletter

The next day, with hope of rescue fading, Samuelsen found a piece of wood and made a split for his severely fractured leg. He eventually managed to slide down the lower tunnels.

“"I was screaming in fear pretty much the whole way down," he said, according to the Tribune.

TODAY: Tales of survival

At the bottom, he scooted another 100 yards or so to the opening near Tanner Park. He said he spent several hours on the side of the road before finally being able to flag down a motorist for help.

"I was near tears when someone finally stopped. I clasped my hands together and was like 'thank you, thank you,'" Samuelsen said, according to Good Morning America. "I was so happy to see somebody who cared enough about me to stop and realize I needed help."

He says he regrets his bad judgment and urges other would-be explorers not to follow his tracks.

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook