A former high ranking Defence Force official has been named as the man accused of attempting to make an intimate visual recording at the New Zealand's embassy in the United States.
Alfred (Fred) Keating, 58, was serving as the Senior Defence Attache in Washington DC when a secret camera was found in a unisex bathroom at the embassy in July last year.
Court documents show the camera had been set up inside a heating duct to record people who arrived and used the toilet.
It was discovered when it fell onto the floor and was reported to embassy staff.
New Zealand police travelled to Washington to investigate the incident and forensically examined the camera and footage back in New Zealand.
Analysis revealed someone activated the camera on 27 July and 19 pictures were taken of people using the bathroom over a five-hour period.
The pictures were only of people who were clothed.
The court documents state thick layer of dust on a homemade platform the camera was mounted on indicated it had been in place for several months.
Mr Keating was protected by diplomatic immunity in Washington but police carried out a search warrant when he returned to New Zealand in November.
No indecent images were found but the prosecution alleges Mr Keating had installed software for the camera and DNA analysis on the memory card matched Mr Keating's.
He resigned from the Defence Force when charges were laid in March.
Mr Keating previously had name suppression, claiming that his daughter, who is currently serving in the Navy, could suffer extreme hardship if he was named.
But in a High Court decision released this week, Judge Powell dismissed an appeal for name suppression to continue after it was discontinued by a district court judge.
He said Mr Keating's reasons do not even come close to meeting the threshold for extreme hardship.
Fred Keating has had a distinguished career in the Defence Force.
Mr Keating joined the Royal New Zealand Navy in January 1976 as a junior weapon electrical engineering mechanic, the Defence Force website says.
At the end of training he was posted to sea on HMNZS Otago.
Mr Keating then went on to do further technical and professional training in 1982 on HMNZS Tamaki, at the Auckland Institute of Technology and HMS Collingwood.
Specialising in combat system engineering, he returned to sea on HMNZS Canterbury in 1985.
He was commissioned as an officer in 1987 and sent to the UK to study engineering before he was posted to HMNZS Southland as the assistant weapon and electrical engineer officer.
He later joined the Australian and New Zealand Anzac frigate project as a team leader.
In 1999, Mr Keating was posted to maritime headquarters in planning and project management roles.
Two years later he was promoted to Commander.
From July 2003 until December 2006 Mr Keating served as New Zealand's assistant naval attache and senior technical officer in the US.
When he returned to New Zealand in January 2007 he was promoted and assigned to Defence headquarters in Wellington as the assistant chief of navy.
He holds a Master of Philosophy degree in Defence and Strategic Studies from Massey University.