WELLINGTON, New Zealand (AP) — A New Zealand soldier has been charged with spying and will face up to 14 years in prison if found guilty.

It is the first time somebody from the military has faced such a charge in New Zealand, at least in modern times, the New Zealand Defense Force said Wednesday. The soldier faces a total of 17 charges and will be tried in a court martial.

The military is releasing few other details about the case ahead of the trial, and the soldier’s name is being kept secret by court order. The soldier was based at the Linton Military Camp, the nation’s main army camp with about 2,000 people near the city of Palmerston North.

The website Newsroom said the man was first arrested in December and has close ties to far-right extremist groups.

As well as four counts of espionage, the man has also been charged with accessing a computer system for a dishonest purpose, possessing an objectionable publication, and negligence in his duties.

New Zealand authorities have been cracking down on far-right groups after a white supremacist shot and killed 51 worshippers at two mosques last year.

Gunman Brenton Tarrant this year pleaded guilty to 92 charges of murder, attempted murder and terrorism. He was sentenced in August to life in prison without the possibility of parole, the first time the maximum available sentence had been imposed in New Zealand.

Newsroom said the soldier has ties to a New Zealand-based extremist group that focuses on bodybuilding and considers its members akin to warrior monks.