COMMACK, Suffolk County (WABC) -- Suffolk County police say a man has died after the dumpster where he and another man were sleeping was emptied into a garbage truck.
The garbage truck emptied a dumpster used by stores in a shopping center located off Veterans Memorial Highway in Commack, New York.
When the truck stopped at William T. Rogers Middle School in Kings Park, New York, nearly five miles away, a school custodian spotted a man atop the truck and told the driver to stop.
Authorities then had to empty the entire truck of trash, right outside the school.
The man was freed from the rubbish, and immediately transported to a local hospital for treatment of his leg injury.
"Somehow, he was able to climb out of that. I wish I could tell you how," said Kings Park Fire Department Assistant Chief Michael Frail.
A second man, buried beneath the rubbish, was removed from the truck - but he didn't survive his ordeal.
"According to the driver, there was multiple loads in there... so he could've been anywhere in there," said Asst. Chief Michael Frail of the Kings Park Fire Department.
Police believe the two men were asleep inside the dumpster when the garbage truck arrived for collection.
Timothy Eagen, the superintendent of Kings Park Central School District, said the incident was "completely unrelated to our building, our students, or our staff."
The middle school closed one parking lot while emergency personnel responded, but school operations were unaffected.
Parents were shocked by the bizarre incident.
"I didn't expect that one," said Mustafa Zamal, whose 8th-grader attends William T. Rogers Middle School.
Retail workers who share dumpsters in the shopping center were also stunned.
"Sometimes we do see some people dumpster diving here but... we don't think they're gonna spend the night," said business owner Geoffrey Schwartz.
The police investigation is ongoing.
* Get Eyewitness News Delivered
* Download the abc7NY app for breaking news alerts
Have a breaking news tip or an idea for a story we should cover? Send it to Eyewitness News using the form below. If attaching a video or photo, terms of use apply.