A man caught carrying a loaded crossbow at late Queen Elizabeth’s Windsor Castle home pleaded guilty in a London court on Friday to an offence under the Treason Act and threatening to kill the monarch.

Jaswant Singh Chail, 21, said “I am here to kill the queen” when he was arrested dressed in black clothing and wearing a hood, metal mask and gloves in the grounds of the castle to the west of London at about 8 a.m. on Christmas Day, 2021.

Elizabeth, who died at age 96 in September last year, was at the castle on the day of the incident, along with her son and now King Charles and other close family members.

Chail had spent months planning the attack, prosecutors said. After he entered the grounds of the castle, he was confronted by a protection officer in an area where the intruder would have access to the private quarters.

The recovered crossbow was a “Supersonic X-bow”, the discharged bolt from which has the potential to cause serious or fatal injuries.

Chail, from Southampton in southern England, had recorded a video before he entered the grounds of the castle, which he sent to his contacts list about 10 minutes before his arrest.

“I am sorry for what I have done and what I will do. I am going to attempt to assassinate Elizabeth, queen of the royal family,” he said in the video, in which he was seen holding a crossbow and wearing a face covering.

“This is revenge for those who died in the 1919 massacre,” Chail said, referring to an incident when British colonial troops shot dead nearly 400 Sikhs in their holy city of Amritsar in northwestern India.

Indians have long demanded a formal apology from Britain for what is also known as the 1919 Jallianwala Bagh massacre, when British forces opened fire on unarmed civilians who had gathered to protest against a colonial law.

“Chail entered the protected areas within Windsor Castle after making threats to kill her late Majesty Queen Elizabeth II. Thankfully police officers intervened and nobody was hurt,” said Nick Price, Head of the Crown Prosecution Service’s Special Crime and Counter Terrorism Division.

“This was a serious incident, but fortunately a rare one.”

Prosecutors said electronic devices were also recovered that showed Chail had previously applied to the Ministry of Defence and the Grenadier Guards in an effort to make contact with the royal family.

Chail appeared at Friday’s hearing at London’s Old Bailey court via videolink wearing a black jacket and spoke only to confirm his name and enter guilty pleas to the three charges of making threats to kill, possession of an offensive weapon, and an offence under the Treason Act.

Judge Jeremy Baker said he would sentence Chail on March 31, and the court ordered medical reports be prepared.

Chail is the first person in 40 years to be convicted under the 1842 Treason Act of having a firearm or offensive weapon in the sovereign’s presence with intent to injure or alarm them.

In 1981, Marcus Sarjeant was sentenced to five years’ imprisonment after he pleaded guilty to firing blank shots at the Queen during the annual “Trooping the Colour” parade in central London.