Mr. Keating resigned from the New Zealand Defense Force two days after pleading not guilty in March 2018 to a charge of making an intimate visual recording of another person.

During his two-week trial this month, Mr. Keating’s lawyer disputed that the camera was his, The New Zealand Herald reported. But on Thursday, a jury in Auckland District Court found him guilty after deliberating for four and a half hours.

Mr. Keating will be sentenced later this year; the charge carries a maximum of 18 months in jail. Defense officials, when asked to comment on Thursday, noted only that Mr. Keating was no longer a member of the military.

No indecent images were found on any devices Mr. Keating owned. But prosecutors detailed a range of evidence that they told the jury pointed toward Mr. Keating’s guilt.

His laptop, under his login, was used several times between March and July 2017 to view the website of the company that made the covert camera, the prosecutors said. Software for the camera was also installed on the envoy’s laptop — but uninstalled just hours after it was discovered, they said.