A homeless man who fell asleep in a commercial trash bin was dumped into the back of a garbage truck Friday and compacted — but escaped serious injury, officials said.

"It's really quite miraculous the guy got out without serious injury," said Bryan Weinert, program director for Ann Arbor's solid waste department.

Weinert said there is a large, dull steel blade that pushes the waste against the wall of the truck to maximize space. He said a person could be protected by trash that is hard to compact.

Lt. Scott Robertson of the Ann Arbor fire department said he did not know how much of the compacting process was completed before the man was discovered.

"Just being in the Dumpster and being dumped would have been a heck of a ride, let alone being compacted," Robertson told The Ann Arbor News.

He said firefighters got on top of the garbage truck and were able to get the man out.

The man was in a container behind a bar and grill when he was picked up.