DETROIT – A Detroit man was trapped hanging upside down from his basement window for 13 hours Thursday after trying to break into his own home.

As the picture below shows, the man's head was just inches away from flood water that was filling up the basement.

Police said the man was trying to break into his own house when his foot got stuck in a very precarious position on the basement window. The man was hanging from the window for 13 hours, police said.

Local 4's Tim Pamplin was at the scene when the man was extricated from the window and taken to an ambulance on a stretcher.

Police said they thought the man was a burglar because he lost his keys and broke into his home Wednesday night through the small ground-level window.

Thirteen hours later, he was found hanging by his ankle as the rainwater continued to pour into the basement.

At lunchtime, his neighbor got a call asking if he had seen the man, so he went to investigate.

"I guess, when he climbed through, the window caught his feet and he was upside down," the man's neighbor said. "Since 1 o'clock this morning."

The Detroit Fire Department got the man out and took him away in an ambulance.

Sign up for ClickOnDetroit Email Newsletters (click here) for more stories like this.