A man who grabbed the flag on Queen Elizabeth II's coffin has been sent to a mental health centre for treatment.
Muhammad Khan 28, was tackled to the ground by police after he seized the royal standard with both hands at around 9:30pm on Sept 16.
He was immediately pinned to the ground by officers as live streaming of the coffin was cut for around 15 minutes.
Louisa Cieciora, deputy district judge, found Khan's actions had caused distress to members of the public and sent him for treatment at the Tower Hamlets Centre for Mental Health.
Khan, of Limehouse, had been charged under Section 4A of the Public Order Act, alleging he acted with intent to cause a person or persons unknown harassment, alarm or distress.
Adrita Ahmed, prosecuting, told Westminster Magistrates' Court: "On 16 September 2022 Her Majesty Queen Elizabeth II was lying in state in Westminster Hall, with lines of the public filing past.
Gasps and screams from public
"Muhammed Khan had queued to view the coffin and at 9.45am entered Westminster Hall, approached the coffin, grabbed the royal standard and pulled it upward."
Police officers said they heard gasps and screams from the public.
In a police interview Khan "expressed the idea that the Queen is not dead and that he approached the coffin because he wanted to check for himself.
"He did say, and this was prior to the state funeral...that he was considering going to the funeral.
"He planned to write to the Royal family," the prosecutor said.
"If they did not reply he planned to go to Windsor Castle, Buckingham Palace and Balmoral to go and speak to the Queen."
Rakesh Bhasin, defending, said it was not clear whether the gasps and screams were caused by Khan approaching the coffin or by the police officers apprehending him.
He said there was no evidence that anyone had been caused significant harm or distress.