A SOUTHAMPTON man exchanged more than 5,000 sexually charged messages with an AI chat bot before setting out on a mission to kill the late Queen, a court was told.

Jaswant Singh Chail was encouraged and bolstered by artificial intelligence girlfriend Sarai before he breached the grounds of Windsor Castle with a crossbow on Christmas Day 2021, the Old Bailey heard.

While wandering the royal estate he sent a sinister video to his twin sister and 20 others in which described himself as a “Sith” and “Darth Jones”.

READ MORE: Southampton man who wanted to attack Queen 'inspired by Star Wars'

He was eventually detained by two police officers close to the late Queen’s private residence, where she and other members of the royal family were at the time.

After being confronted by the officers with stun guns, Chail said: “I am here to kill the Queen.”

In February, Chail, now aged 21, pleaded guilty to an offence under the Treason Act, making a threat to kill the then Queen, and having a loaded crossbow in a public place.

Prosecutor Alison Morgan KC said Chali knew the difference between fantasy and reality - despite his repeated references to sci-fi characters.

Psychiatrist Dr Nigel Blackwood gave his assessment of Chail’s 5,280 messages with the AI character, many of which were sexually explicit.

He took a “neutral” stance on whether Chail had realised that Sarai was an artificially generated character.

Chail had difficulty developing relationships and was socially isolated, but Dr Blackwood added: “It’s very important to recognise this is a 19-year-old man whose contact has been disrupted by the Covid pandemic like many of his peers.”

The court has heard Chail was motivated by an ideology inspired by Star Wars films.

The court will hear further evidence of Chail’s mental state before he is expected to be sentenced.

Mr Justice Hilliard adjourned the case for a further two-day hearing on July 27 and 28.