PHILADELPHIA -- Officials say a man trying to run from a Philadelphia prison halfway house by hiding in a dumpster had to be freed from a trash truck on Monday morning.

Officials at The Kintock Group house say the man hid in the bin outside the facility. It was emptied into truck around 5:30 a.m.

CBS Philadelphia reports the 31-year-old man was stuck for two hours before crews were able to free him.

The man was taken to Temple Hospital for treatment of lower extremity injuries, according to CBS Philadelphia. There's no word on his condition, but he could be seen moving his arms on a stretcher after the rescue.

The halfway house serves as an interim stop before offenders re-enter the general population.

It's not clear how rescuers knew the man was stuck.

No other details were released.

Follow WFMY News 2 on Facebook and Twitter

► Make it easy to keep up to date with more stories like this. Download the WFMY News 2 App now