The incident happened whilst the Queen was on a night walk.
Queen Elizabeth II had a very close call at Buckingham Palace.
The Queen was on a late-night walk when a guardsman mistook her for an intruder, a journalist has revealed.
"The Queen is a fan of late-night walks. When she struggles to sleep she will sometimes put on a mac and walk around the palace grounds, an ex-guardsman told me," Grant Tucker wrote for the The Times.
"On one occasion he was patrolling inside the perimeter of the Palace walls at 3 a.m. when he spotted a figure in the darkness. Thinking that he had come across an intruder, he shouted: 'Who’s that?' To his surprise it was the Queen."
The unidentified guard said "Bloody hell" before telling the Queen, 90, that he "nearly" shot her.
Kate Middleton and Queen Elizabeth II
"Realising that he had spoken out of turn, he waited for a dressing-down," Tucker continued. "'That’s quite all right,' Queen Elizabeth II replied. 'Next time I’ll ring through beforehand so you don’t have to shoot me.'"
The Queen has been sick of late with a "heavy cold", cancelling appearances at Christmas and New Year's church services.
For more on Queen Elizabeth II, pick up a copy of WHO on sale now.
Access your account
Personalise the newsletters you receive and gain access to competitions and offers