Two men found with objectionable material from Islamic State (IS) have been sentenced, with one of the cases understood to be the first of its kind in New Zealand.
Imran Patel was sentenced to three years and nine months for distributing IS material, including videos of a beheading.
He had to be forcibly pulled into the cells at the Auckland District Court, yelling as he was jailed.
He had earlier admitted possessing, making and distributing the objectionable material and appeared today for sentencing.
As he was led into the cells, he shouted to the media bench to tell Prime Minister John Key to stop being a slave to America and to get out of Iraq.
A security guard had to forcefully push him into the cell doors.
The court was told how Patel had 62 files on his laptop and copied some of the videos to six devices. Judge Russell Collins said the copying showed he had plans to distribute the material.
Patel also sent text messages with links to a beheading video to 52 people, despite receiving a warning via text message from his telecommunications provider.
Judge Collins said, as a district court judge who heard on a daily basis how violence destroyed people's lives, he had to denounce the distribution of videos that glorified and celebrated grotesque violence.
The judge said it was the first case of its kind where someone had been prosecuted for violent videos.
He reiterated that Patel was not facing terrorism charges, and said the likelihood of him performing a terrorism act had not being considered.
IS videos found after bomb remark
In the second case, Niroshan Nawarajan was sentenced to five months home detention when he appeared at the Auckland District Court on a string of charges including possessing objectionable material.
The court was told how Nawarajan was seen talking to himself and gesturing to his T-shirt outside the American Consulate. Once inside, he asked if Americans worked in the building and whether it was bomb-proof.
He was asked to leave by security who then put the building into lockdown.
Police officers caught up with him around the corner on Queen St and he struggled before kicking and striking at one of the constables.
Police later found a hard drive in his backpack containing video, magazines and a 29 minute IS propaganda video that included an execution.
In sentencing, Judge Collins also ordered Nawarajan to undergo counselling for drug and alcohol abuse.
He also stressed that Nawarajan had not been charged with terrorism-related activity.
The Islamic State group has claimed responsibility for a series of attacks throughout the world in recent months, including in Indonesia, at Brussels' international airport, where 32 people were killed, and several co-ordinated attacks in Paris in November that killed 130.
More recently, the gunman who killed 49 people at a gay nightclub in Orlando, Florida, described himself as an "Islamic soldier".
Islamic State and New Zealand
Today's court cases related to objectionable material charges, not terrorism charges.
A number of countries have charged citizens drawn to the Middle East to fight with IS under counter-terrorism laws. Some, such as Australia and the US, have programmes that use "real-time social media monitoring" to keep track of any terrorism websites or postings.
The government has said the threat of terrorism in New Zealand is low, but it is keeping a close watch on about 40 people.
Another small group of New Zealand women have left Australia to IS-controlled areas.
Prime Minister John Key said last year there was a "small number" of people under 24-hour surveillance.
While authorities were aware some people in New Zealand were actively raising money to support IS, Mr Key said it was not always straightforward to secure a conviction.
Authorities would only act if they were "absolutely sure" they would secure a conviction, he said.
Activity supporting terrorist activities, including fund-raising, is an offence under the Terrorism Suppression Act.
- RNZ / ABC