Video footage from Twitter shows a man's terrifying climb through a second-floor flat window in Leith, Scotland.
The man is seen boldly perched on the pipe as he leans towards the window and dives into the room.
The filmer said: "I was listening to music and writing when by chance I looked out the window. I then noticed a young man climbing the drain pipe from the street below. I heard him claim he has lost his keys to a passer-by shortly before.
"Without much notice, he then climbed the pipes and I got my phone to film. I was shocked but also very impressed. I could hardly watch when he was making his way into the window, so my camera-work was not great as I also hard to turn away.
"I have since heard he is an American in his 20s living in Edinburgh. He is very lucky that Scottish drainpipes are solid cast iron and date back 100+ years."