A burglar had to be rescued by police after he got stuck in a window for five hours.

Burglar trapped (c) Twitter

Burglar trapped (c) Twitter

A man, who was wearing jeans, black socks and no shoes, was crying for help when he got trapped in the tight spot when he was trying to enter a home uninvited.

A picture taken by the West Midlands Police, which was obtained by the Metro Online, captures the crook with half his body hanging out the window with the other inside the house.

The male, who has remained unnamed, was taken into custody by police after being rescued and quizzed about his actions.

West Midlands Response Team took to social media to share the news.

They tweeted a picture of the man and captioned it: ''#dontgetstuck if your trying to break in.

''5 hours later shouting help #triptocustody by all means (sic)''.