A man waving large knives outside Buckingham Palace in the presence of tourists was shocked with a Taser stun gun and arrested on Sunday, police said.
Queen Elizabeth II and her husband Prince Philip were at one of their weekend retreats, in Sandringham eastern England, at the time of the incident that occurred just before 12:00 pm (1200 GMT).
"A man was seen outside the (palace's) centre gate in possession of two knives," said a spokesman for the capital's Metropolitan Police force.
"He was not making threats to members of the public but he was challenged by police. He acted aggressively and a Taser was discharged.
"He is thought to be in his fifties. He was arrested on suspicion of affray and has been taken to a central London police station," the spokesman added.
A video on YouTube showed the man placing a large blade to his neck before waving it about. Moments later he fell to the ground after being shocked with the Taser gun and was quickly surrounded by police officers.