dumpster
A man rescued from inside a garbage truck in the Juniata section of Philadelphia remains hospitalized in critical condition, Nov. 27. A picture taken on Feb. 15, 2016, shows a full dumpster in a street in Conakry in Guinea. Getty Images

A 33-year-old man is said to be in critical condition Monday after getting stuck inside a garbage truck compactor outside a halfway home for prisoners in Philadelphia.

Police said that it took firefighters over two hours to free the man after digging through trash and debris in the back of the garbage truck.

The dramatic footage of the rescue obtained by the Associated Press was said to have taken place inside a Waste Management Truck outside the Kintock Group home along the 300 block of East Erie Avenue around 5:30 a.m. EST on Monday, according to the facility and fire dispatchers. The firefighters got the man out of the truck and on to a stretcher around 7:40 a.m. EST on Monday.

The Kintock Group home, outside which the rescue took place, serves as an interim stop before state and federal prisoners are released.

Police said that it appeared the man had fallen asleep in a garbage bin when he was tossed on to the truck. He was then buried under bagged and loose trash after which firefighters tried to reach him on Monday morning, according to the New York Post.

In the video, the man could be seen moving his arms a little while he was strapped to the stretcher. He was listed to be in critical condition after suffering abdomen, hip and leg injuries, Philadelphia Police said. He was taken to Temple University Hospital.

Fire officials said that residents in the area heard the man scream and then called 911. The man's identity has not been released yet.

Authorities had initially said that the man might have escaped from the home itself, however Pennsylvania Department of Corrections spokeswoman Susan McNaughton confirmed that no one had been missing from a roll call, according to NBC Philadelphia.

Police said it was unclear how the man got into the secured facility grounds in the first place if he had not escaped from the home. They speculated that he could have been asleep in the dumpster or wound up in the truck before it drove onto the grounds of the facility.

A similar incident occured in February this year, when Tampa Fire Rescue and police officers rescued a man trapped inside a garbage truck in Tampa, Florida. According to the police, the Waste Management driver had reportedly heard a man calling for help while making his rounds. Sometime during his morning route, the man, who was believed to be sleeping in a dumpster, was apparently deposited into the garbage truck along with other contents of the dumpster. Crews worked for more than an hour to get the man out. They even had to bring in a crane to pull the man out from the truck.

In another instance in November this year, a man was rescued from the compactor of a garbage truck in Los Altos, California, after being stuck inside it. He was extricated from the truck by firefighters and suffered non-life-threatening injuries. Officials did not release the name of the man and they also could not confirm which company the garbage truck belonged to, according to a Patch.com report.