What are the odds of Queen Elizabeth II being shot? Well, if she takes a stroll in her palace gardens late at night without informing the guards, she's not doing herself any favours.

Going by the undated tale told by an ex-palace guard to The Times Diary, the Queen was once mistaken for an intruder – and the guardsman "nearly shot" her.

One night, at around 3am, the Queen was taking a walk in the palace garden, when the guard on patrol within the perimeter walls spotted a figure moving in the dark. Suspecting an intruder, he shouted "Who's that?"

"Bloody hell, Your Majesty, I nearly shot you," the surprised guard blurted out on seeing the Queen emerge from darkness.

Expecting immediate chastisment for his frank response, the Queen instead calmly replied: "That's quite all right. Next time I'll ring through beforehand so you don't have to shoot me," the Times Diary wrote.

Elizabeth II, who has remained active throughout her life, is said to be a fan of late night walks. When she struggles to sleep, she is said to walk around the palace grounds wearing a winter coat. The encounter is thought to have taken place at the monarch's official London residence, Buckingham Palace, several years ago.

Of the tale, Joe Little of Majesty Magazine said: "What a great story. While wanting to take it with a pinch of salt, if Prince Andrew's identity can be challenged by a policeman in the same garden in broad daylight then there's no reason to think that something similar couldn't happen to his mother in the dead of night."

As Little points out, the Queen isn't the first royal to be mistaken for an intruder on their own grounds. In 2013, Prince Andrew was mistaken for an intruder and confronted by armed police as he walked in the palace gardens.

Queen Elizabeth II
The Queen fires the last shot from a standard SA 80 rifle during a visit to the Army Rifle Association centenary at the Bisley ranges on 9 July 1993 Reuters

The palace guard is not twitchy without reason, as intruders have previously made their way onto royal premises. In August 2016, a 22-year-old man was arrested just after 4am for climbing over a security fence and being spotted by officers monitoring CCTV.

In May 2016, 41-year-old David Hennessy climbed over barbed wire and roamed freely in the palace grounds for 10 minutes while Her Majesty, the Duke of Edinburgh and Prince Andrew were inside. He later asked officers: "Is Ma'am in?"

David Hennessy
David Hennessy roamed freely in the palace grounds for ten minutes in May 2016 Handout

There was also the unforgettable incident when Michael Fagan broke into Buckingham Palace and entered the Queen's bedroom in 1982 – with the incident being one of the 20th century's worst royal security breaches. The 9 July 1982 intrusion was Fagan's second attempt to get inside the palace, with the first happening about a month before.

The 90-year-old Queen has been recovering from a "heavy cold" for over two weeks after postponing her Christmas travel plans to Sandringham House in Norfolk. She usually takes the train to and from Kings Lynn to reach her Norfolk retreat, but this year she broke tradition by missing a Christmas Day church service – instead travelling there by helicopter in the midst of illness.

Fears about the Queen's health have been calmed by Court Circular reports that she performed a ceremonial duty on 3 January. She awarded a Lieutenant of the Royal Victorian Order (LVO) to Ray Wheaton for his services to the Royal Family and Royal household.

According to the Circular, she also sent a message of condolence to the president of Turkey following the attack in an Istanbul nightclub on New Year's Day that killed 39 people.