“Tell John Key to stop being a slave to America and get out of Iraq. Allahu Akbar,”

An Auckland man who distributed extremist videos, featuring footage of people being shot, beheaded and burned alive has been dragged from court screaming “Allahu Akbar”.

Imran Patel, 26, launched into the rant as he was jailed for three years nine months before Auckland District Court this afternoon.

“Tell John Key to stop being a slave to America and get out of Iraq. Allahu Akbar,” he shouted, while being restrained by court security.

It is understood to be the first person in the country to be sentenced over so-called terrorist material and the Crown said he had an “utter lack of insight and remorse”.

But Defence counsel Adam Holland described his client as “naïve and misguided”.

The offences under the Films, Videos and Publications Classification Act are routinely seen in courts in relation to child pornography but it is understood this case is the first of its kind in the country.

But Judge Russell Collins was quick to stress Patel was not being prosecuted over terrorist acts; only on the charges before the court: possessing, making and distributing objectionable material.

He described the defendant as “an intelligent man” but said the violence depicted in the videos he shared was “grotesque”.

In October, the Mt Roskill man sent text messages to 52 people with a link to an Isis-made video, with accompanying words about revenge.

The montage showed 14 prisoners lined up before two men shot them in the head one by one.

“Each slumps to the ground after being shot”, the summary of facts said.

Patel received a warning from his cell provider the following day about the content of the message but went on to text a similar link 24 hours later.

The next video showed people in orange jumpsuits being beheaded by masked men and resulted in further censure by the telecommunications company.

On October 22, Patel was barred from sending messages.

His reaction was to get a new number and address the same 52 recipients.

“For those of you who complained [to the non-believers], remember that you’re a Muslim; please behave like one,” he texted.

Patel urged them to come to him to resolve any issues face to face.

Less than two months later, police raided his home and found a laptop, DVD, an iPod and three USB drives on which were dozens of publications showing extreme violence and torture.

Patel told police he wanted to show a “true picture” of how ISIS was fighting the Syrian regime and helping people and that he believed it was a freedom-of-expression issue.

“He explained he had sent them to people to provide information on what was really happening in the Middle East because the western media doesn’t have a balanced view,” Crown prosecutor David Johnstone said.

Mr Holland said his client suspected he was being monitored by the police and was in regular contact with officers; but made the foolish assumption he was doing nothing wrong.

“He now understands he made a very grave error.”

But the lawyer argued Patel’s offending was totally incomparable to the worst child-porn crimes, as the Crown had suggested.

Mr Holland said his client had strong support in the community and his parents had even organised meetings involving the police deputy commissioner before and after the offending.

Home detention was a viable option, he stressed.

But Judge Collins disagreed.

“The violence depicted in these videos and images may be in places some distance from New Zealand but as one of many District Court judges . . . we deal on a daily basis with the huge harm that violence causes in the lives of New Zealanders,” he said.

“The glorification and celebration of violence at such a grotesque level is a matter of serious concern for the courts and must rightly be the subject of deterrence.”

Man sentenced over ‘terrorist material’