A man who told police he wanted to kill the Queen of England has been charged with treason in the first case in decades to tackle the crime.

Jaswant Sing Chail, 21, was arrested on Christmas 2021 at Windsor Castle trying to scale the walls while carrying a crossbow. When questioned by police, he told them "I am here to kill the queen." 

Chail has now pleaded guilty to a charge under the U.K.’s Treason Act, which makes it a crime to "injure the person of Her Majesty Queen Elizabeth II, or to alarm her Majesty," along with charges of making threats to kill and possessing an offensive weapon. 

He appeared at London’s Central Criminal Court via video link from Broadmoor, a secure psychiatric hospital where he remains in custody.

Queen Elizabeth II smiling

Queen Elizabeth II passed away on September 8, from old age. She was 96.  (Photo by Tim Graham Picture Library/Getty Images)

BRITISH AIRWAYS TAKES HEAT FROM ITS OWN PILOT FOR STIFLING SOCIAL MEDIA RULES: ‘END OF MY FLYING POSTS’

Police testified that Chail wanted revenge on the monarchy for its treatment of India and sent a video to a group of contacts "stating his desire to harm the late queen." Elizabeth passed away in Sept. 2022.

Treason Elizabeth UK

This undated photo released by the Crown Prosecution Service on Friday Feb. 3, 2023, shows a crossbow which Jaswant Singh Chail, 21, was carrying when arrested, after being caught in the grounds of Windsor Castle. Chail pleaded guilty to treason on Friday for planning to attack Queen Elizabeth II.  (Crown Prosecution Service via AP)

In the video posted to Snapchat right before he attempted to enter the castle, he said, "I’m sorry, I’m sorry for what I’ve done and what I will do. I will attempt to assassinate Elizabeth, Queen of the Royal Family," The BBC reported. 

UK TO PROBE WHETHER THE 1998 OMAGH BOMB, ONE OF IRELAND'S DEADLIEST INCIDENTS, COULD HAVE BEEN PREVENTED

"This is revenge for those who have died in the 1919 Jallianwala Bagh massacre," he continued. "It is also revenge for those who have been killed, humiliated and discriminated on because of their race."

Mask Treason UK court

This undated photo released by the Crown Prosecution Service on Friday Feb. 3, 2023, shows a mask which Jaswant Singh Chail, 21, was wearing when arrested, after being caught in the grounds of Windsor Castle with a loaded crossbow. Chail pleaded guilty to treason on Friday for planning to attack Queen Elizabeth II.  (Crown Prosecution Service via AP)

The massacre, which occurred when British troops opened fire on thousands in the city of Amritsar after the people gathered in protests against the Rowlatt Act. The death toll is disputed but ranges from hundreds to over 1,000. 

BORIS JOHNSON: THE WEST MUST GIVE UKRAINE ALL THEY NEED ‘AS FAST AS POSSIBLE'

Chail may have also tried to get close to the royal family by applying to join the Ministry of Defense Police and the Grenadier Guards, according to the BBC. 

British court treason

A photograph taken on Aug. 17, 2022 shows the entrance of the Westminster Magistrates' Court, in London, prior to the start of the hearing of Jaswant Singh Chail, following his arrest while armed with a crossbow at Windsor Castle as Queen Elizabeth II spent Christmas Day there. Police charged the 20-year-old man with an offence under Britain's 1842 Treason Act after arresting. Chail, from Southampton in southern England, has also been charged with making threats to kill and possession of an offensive weapon following the incident at the castle, southwest of London, last year. (Photo by Carlos Jasso/AFP via Getty Images)

Metropolitan Police Counterterrorism Command chief Richard Smith stressed that this was "an extremely serious incident." He praised the officers who patrolled the castle grounds for their "tremendous bravery" who detained Chail "without anyone coming to harm."

Treason used to carry a punishment of death, but amendments made in 1998 through the Crime and Disorder Act changed the maximum sentence to life imprisonment. The last hanging for high treason occurred in 1946 for William Joyce, a World War II Nazi propaganda broadcaster. 

CLICK HERE TO GET THE FOX NEWS APP

Charges under the Treason Act remain rare, with the last known trial in 1981 when Marcus Sarjeant was charged for firing blank shots at the queen as she rode on horseback in the Trooping the Color parade in London. He was sentenced to five years in prison after pleading guilty. 

The Associated Press contributed to this report.