A homeless man died after breaking into an aquatic center in Scottsdale, Ariz., and getting stuck in a pipe, investigators said Tuesday.

Scottsdale police have identified the man as 31-year-old Ryan Kelly. An officer on patrol early Monday heard faint calls for help, police said. After a search, officers determined that the calls were coming from the locked Eldorado Aquatic and Fitness Center.

Eldorado Aquatic and Fitness Center in Scottsdale, Ariz. 

Eldorado Aquatic and Fitness Center in Scottsdale, Ariz.  (City of Scottsdale )

Investigators determined Kelly had climbed over the center’s fence and crawled inside a cylindrical support structure for the waterslide where he became stuck.

GEORGIA TEEN DROWNS IN SWIMMING ACCIDENT, FOURTH PERSON TO DIE IN LAKE LANIER THIS MONTH

Police spokesman Sgt. Kevin Watts told the Arizona Republic that the hollow steel tube acted like a megaphone, allowing the patrol officer to hear him from a quarter-mile away.

Fire officials arrived on the scene and were communicating with Kelly by around 2:30 a.m., the Arizona Republic reported. They were forced to dismantle the waterslide to reach him.

CLICK HERE TO GET THE FOX NEWS APP

Kelly died by the time he was pulled from the pipe around 7 a.m. The Maricopa County Medical Examiner is expected to determine his official cause of death.

The Associated Press contributed to this report.