A tourist jumped over a wall to hide from his pals at Edinburgh Castle – not realising there was a 30ft-deep empty moat on the other side.
The 20-year-old man broke both ankles in the fall after 2am on Sunday.
He also suffered suspected head and neck injuries.
The victim, who is believed to have been on holiday in the capital, was rescued by fire crews and paramedics and taken to Edinburgh Royal Infirmary.
Lothian and Borders Fire Brigade said it was an unfortunate accident involving someone who didn’t know the layout of the castle.
A spokeswoman added: “It is believed he jumped over the wall to hide from his friends and didn’t realise the other side was such a big drop.”
An ambulance service spokeswoman said: “He’d fallen into the moat under the drawbridge, just at the entrance.”
The bottom of the moat is covered with loose chipping stones, similar to those used on garden paths.