A man has been arrested at Buckingham Palace after causing a security scare for Queen Elizabeth II and other royal family members.

The Telegraph reported that a man named Connor Attridge was arrested on Sunday night at Buckingham Palace. He purportedly trespassed on the grounds of the royal residence while Queen Elizabeth II's staff was preparing for the Platinum Jubilee celebrations.

According to Oxford Mail (per Fox News), the 28-year-old intruder entered the area through the vehicle gate of the Royal Mews. The gate was opened for an authorized vehicle when he successfully sneaked in.

A household staff stopped him, but Attridge insisted that he needed to come in since he wanted to see the Queen.

After trying to further trespass, he was sent out of the gate and arrested.

Queen Elizabeth II, fortunately, was not in residence at the time as she has been staying at Windsor Castle. She also recently traveled to the Balmoral estate in Scotland to have a short break before attending the upcoming celebrations.

"This was at worst reckless and at best bordering on an accidental offense," Attridge's attorney, Daniel Mullin, said.

He revealed that his client suffers from mental health issues and had no intention to go further in the Palace than he did. The man was granted bail with conditions and received orders not to travel to London except to attend court.

District Judge Nina Tempia adjourned the case to June 28 so that the Crown Prosecution Service could obtain consent from Attorney General Suella Braverman. The step is needed, especially in trespassing cases involving a protected area.

Not the First Incident

Aside from the recent trespassing case, another man also dressed as a priest and pretended to be a friend of Coldstream Guards' military chaplain. He was allowed inside without showing his credentials or any identification.

After making it inside the Palace, he ate, drank, and had conversations with the soldiers.

READ ALSO: Amber Heard Bitter After Losing Defamation Trial Against Johnny Depp: 'I'm Sad'

But the following morning, he was removed from the area after the police received a notification.

"The Army takes this breach of security extremely seriously, and it will be thoroughly investigated as a matter of priority," a British Army spokesperson revealed to Fox News Digital at that time. "This incident is now part of an ongoing investigation, and it would therefore be inappropriate to comment further at this time."

READ MORE: Bart Bryant Tragic Cause of Death Tragic: PGA Tour Winner Dead at 59