CHANNELVIEW, Texas -

A man is recovering after nearly getting crushed in a dump truck trash compactor in Channelview.

According to the Channelview Volunteer Fire Department, the man was sleeping inside a dumpster on South Sheldon Road near East Freeway Friday morning when the garbage truck came by on its route.

According to a spokesperson with Waste Management, the driver of the truck was emptying dumpsters from several sites in the area when authorities say he heard screams coming from inside the truck. The driver saw the man who was trapped inside and called for help.

"We received a call at 4:59 a.m. of a person stuck in a trash can compacter truck," said Assistant Chief Charles Villegas with the Channelview Fire Department.

Fire officials said the driver stopped as soon as they heard the man's screams.

"Once crews got there, they lowered a ladder down into a container and were able to get him out and lowered him from the top of the container down to the ladder truck," said Villegas.

The man was taken to an area hospital with minor injuries.

Firefighters said if the driver had not checked the back of his truck, the man could have been crushed by the blade inside the compactor.

Waste Management said one of their initiatives is to make the community aware of how dangerous it is for anyone to sleep inside a dumpster.