Queen Elizabeth has some of the best security in the world, but that didn't stop an intruder from scaling her fence this week.

A 22-year-old unarmed man climbed over the metal fences outside Buckingham Palace around 2 a.m. on Wednesday morning, and walked toward the Queen's residence.

According to ITV reporter Jonathan Swain, the intruder also got past "the CCTV and the heat sensors that also surround the palace."

"And, of course, the building is also patrolled 24 hours a day by armed guards," he said.

The police were able to detain the man after only four minutes, but it's still a concern as he was "just meters away from where the Queen was sleeping."

This content is imported from Twitter. You may be able to find the same content in another format, or you may be able to find more information, at their web site.

A man has been arrested after climbing over the front gates at Buckingham Palace.@SwainITV explains more... pic.twitter.com/Myby021lOH — Good Morning Britain (@GMB) July 11, 2019

The incident comes almost 37 years to the day after another break-in at Buckingham Palace. In 1982, 30-year-old Michael Fagan managed to bypass security by scaling a Palace drainpipe, and entered the British monarch's bedroom. He and the Queen chatted for roughly 10 minutes before help arrived.

''The first person to enter her room was a chambermaid 10 minutes after the intruder got in,'' reported The Standard at the time.

''Police arrived another eight minutes after that - when the chambermaid had already led the man away. The chambermaid handed the man over to a footman.''

It was at least the second time Fagan had broken in to the residence.

"I found rooms saying 'Diana's room,' 'Charles's room;' they all had names on them. But I couldn't find a door which said 'WC,'" Fagan said, according to the Telegraph. "All I found were some bins with 'corgi food' written on them. I was breaking my neck to go to the toilet. What do I do? Pee on the carpet? So I had to pee on the corgi food."

While Fagan is perhaps most well-known trespasser at Buckingham Palace, there have been at least two other incidents over the past decade. In 2016, a man scaled the wall before being apprehended, and in 2013 a knife-wielding man was stopped from trying to enter the Palace's gate.

Caroline Hallemann Senior Digital News Editor As the senior digital news editor for Town & Country, Caroline Hallemann covers everything from the British royal family to the latest episodes of Outlander, Killing Eve, and The Crown.

This content is created and maintained by a third party, and imported onto this page to help users provide their email addresses. You may be able to find more information about this and similar content at piano.io