A Metropolitan Police spokeswoman said: "The 22-year-old man was arrested at approximately 2am on Wednesday July 10 by officers from the Met's Royalty and Specialist Protection Command after he climbed over the front gates at Buckingham Palace".
An intruder has broken into Buckingham Palace as the Queen slept just metres away.
"The police eventually detained him under the mental health act, but they have to ask some serious questions about how he got on and how he had so long to roam free", the source says.
The royal source added: "This intruder got into the Palace nearly 37 years to the day since Michael Fagan ended up getting inside the Queen's bedroom".
"Now, he was able to get over the fence, wander towards the palace - the police detained him after only four minutes".
The Queen had just returned home from a trip to Cambridge when the incident took place.
"He was determined to get inside the palace and was banging down the doors but, thank goodness, this time everything was locked up".
It was the Queen's long-time aide Paul Whybrew - still employed by the Queen to this day - who came to the rescue.