A British court sentenced extremist Imran Khawaja to 12 years in prison on Friday for his work with the Islamic State group, also called ISIS. Khawaja, a 27-year-old from west London, admitted to attending and training at an ISIS camp in Syria, preparing for acts of terrorism and having firearms, BBC News reported. He'll serve at least eight years, as the judge declared him "a significant risk of serious harm" to the public.

"Imran Khawaja's actions are one of the most appalling examples of violent extremism that I have seen committed by British jihadis returning from Syria," Crown Prosecution Service deputy head of counterterrorism Deborah Walsh said in a statement to Reuters.

Khawaja, who the Daily Mail reported is closely linked to ISIS executioner Jihadi John, allegedly joined the terrorist group Rayat al Tawheed (Banner of God), an ISIS-aligned organization. Police said he helped produce propaganda pictures and videos to attract new members.

"Khawaja was seen in a disturbing video posted on social media which includes a bag of severed heads," according to a police statement released Friday. "He appears in the footage with his face covered picking up one of the heads from the bag and showing it to the camera."

Khawaja made headlines last year when he faked his own death in order to return to the United Kingdom from Syria unnoticed. He posted an obituary online saying he'd died in battle, and his cousin Tahir Bhatti tried to drive him back from Serbia. They were caught by port officials.

The suspected insurgent argued that he was indoctrinated and just wanted to return to his family in the U.K. He was also reportedly dissatisfied with his Syrian lifestyle, complaining about a lack of toilet paper, condoms and cocoa butter. But Justice Jeremy Baker didn't believe him. The judge said Friday that Khawaja was a "willing and enthusiastic" member of the recruitment team and was a threat to the British people.

"It is clear in the last few years you have been showing an increasing interest in Islamic jihadist material," Baker said. "Your interest was sufficiently profound for you to travel to Syria to train for jihad. I’m also satisfied, by the time you decided to return to the U.K., you had completed your terrorist training."

Bhatti and Khawaja's friend Asim Ali were each sentenced to 21 months in prison for helping and funding him.