The search for the man began shortly before 6 a.m. Monday outside the Kintock Group on Erie and Whitaker avenues. The Kintock Group is a halfway house for male and female offenders who are beginning their transition back into the community.
Police say the 33-year-old man was sleeping inside a dumpster when it was lifted into a waste management truck.
No one has yet said how authorities realized the man was inside the truck.
When police saw he was stuck, they called rescue crews.
Firefighters hauled out ladders. They raked through the trash, digging through the truck.
It took nearly two hours to get the man out of the dumpster.
He was taken to Temple University Hospital with lower abdominal, hip and leg injuries. He is listed in critical condition.