Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A man dangled upside down in a narrow chute for 18 hours after becoming trapped inside of a rail tanker car, firefighters in Seattle said.

The 25-year-old was found after passersby heard him screaming for help and called 911.

"The man’s head was popping out through the bottom of the chute underneath the train," the Seattle Fire Department said in a statement. "The man’s feet were popping out of the top of the chute. The patient explained he was trapped in this confined space for 18 hours."

Man crawled into this small hole and slid down a small incline and was trapped head first pic.twitter.com/jiU4i8rRhK — Seattle Fire Dept (@SeattleFire) February 4, 2015

It was unclear why he had attempted to crawled through the small hole.

Firefighters were able to free the man in about two minutes after pulling him out by his legs "to get him out of his precarious position," officials said.

Medics transported the man to @Swedish Ballard to be checked out for minor injuries pic.twitter.com/5qHlezjUT8 — Seattle Fire Dept (@SeattleFire) February 4, 2015

He was transported to a hospital with no visible injuries. The rail tanker car was located on a short section of track that is used for storage, officials said.

- Shamar Walters