The former Navy commodore allegedly planted a hidden camera to take intimate photos at the embassy, which employed some 60 people at the time.

Alfred Keating, a former New Zealand naval commodore who was once the highest ranking military official at New Zealand's embassy in Washington, DC, is on trial in the Auckland District Court for planting a hidden camera in the embassy's restroom in 2017, a CNN report says.

Keating is said to have planted a hidden camera in the embassy's unisex bathroom for the purpose of taking pictures of employees. There were about 60 employees working for the embassy at the time, The Hill reports. Keating is charged with attempting to make in intimate recording of another person.

#BREAKING — Commodore Alfred Keating has been accused of making an intimate video in our embassy in Washington DC https://t.co/bV7EgOBwY0 pic.twitter.com/J9bjBincxB — nzherald (@nzherald) 3 мая 2018 г.

​The device, planted inside a heating duct, was accidentally discovered when it fell to the floor in July 2017, CNN reports. Court documents say that, judging by the layer of dust on the platform where the camera was mounted, the device was in place for several months before being uncovered.

New Zealand investigators reportedly discovered 20 existing files and more than 700 deleted files on the camera's memory card, according to The Hill.

The investigators also say they found DNA traces on the webcam memory card which matched Keating's DNA.

The former commodore may face a sentence of up to a year and a half in prison if convicted. The trial began Monday, and Keating pleaded not guilty, The Hill reports. Currently, Keating does not work for the Royal New Zealand Navy.