The man arrested for allegedly bum-rushing Queen Elizabeth II’s casket was reportedly checking to see if she was alive. The bombshell came out while the accused culprit, Muhammad Khan, appeared in court.

“At the time when you were in Westminster, you didn’t accept that the queen was dead and that was the reason you were moving towards the coffin to satisfy yourself that she was,” Judge Michael Snow told the defendant during the wild hearing, per the BBC.

He was addressing the shocking incident that occurred Friday night after the 28-year-old defendant allegedly tried to grab the flag draped over the monarch’s casket as she lay in state at Westminster Hall. Khan had been among about 250,000 people who shuffled through the building between Wednesday and Monday to visit the deceased after waiting for hours along the banks of the River Thames, the Guardian reported.

The final visitors stand on line to pay homage to Queen Elizabeth II as she lies in state in Westminster Hall on Sept. 19, 2022, in London, United Kingdom.

“The defendant had reached Westminster Hall. He was then seen by officers, who were present, to approach the coffin,” prosecutor Luke Staton said describing the scene. “He stepped off the carpet in the direction of the catafalque, then grabbed hold of the Royal Standard flag draped over the coffin with both of his hands.”

A live television feed showed the defendant darting out of line and climbing up the steps to the catafalque before touching the late monarch’s coffin.

The London native was subsequently detained, arrested and interviewed by police. It was then that he reportedly revealed that he believed Queen Elizabeth — who died on Sept. 8, 2022 — was still alive, the court heard.

“The defendant did express the idea that the queen is not dead and that he approached the coffin because he wanted to check for himself,” declared Staton. “He did say, prior to the state funeral, he was planning on going to the funeral.”

The coffin of Queen Elizabeth II as she lay in state in Westminster Hall on Sept. 19, 2022, in London, United Kingdom.

In addition, Khan had planned to write to the Royal Family, and if they did not reply, he was going to visit Buckingham Palace, Windsor Castle and Balmoral “to try to make contact” with Her Majesty. When asked how many times he’d attempted this mission, the Londoner replied, “As long as I am living.”

Khan had been charged with behavior intending to cause alarm, harassment or distress. However, he was subsequently let out on bail on the condition that he stays in a mental-health hospital until his next court appearance on Oct. 18, the BBC reported.

Despite this, the defendant was declared unfit to participate in the legal proceedings after doctors determined that he had been experiencing delusions.

“He is delusional still and thinks the queen is not dead,” declared Judge Snow. “[He] thinks King Charles has something to do with it and may go to Windsor Castle to pay his respects, but also because he still thinks she is alive.”