Updated

A New Zealand police officer assigned to protect the prime minister has managed to keep his job despite leaving his gun in a public bathroom at the nation's Parliament and then enlisting a colleague to drive back and retrieve it.

Police on Friday released the results of their yearlong investigation into the June 2016 incident.

In their report, they said the officer made a genuine mistake by leaving his Glock service pistol in the bathroom, but should have dealt with it differently to minimize the risk to the public.

According to the report, the gun was discovered by a visitor to the bathroom just before the second officer arrived back nearly an hour-and-a-half after it was left there. The second officer was then able to secure the weapon without further incident.

Both officers are part of the elite Diplomatic Protection Service, which has a similar mission to the U.S. Secret Service.

Police Superintendent Chris Scahill said the officer who left the gun in the bathroom no longer has a front-line role in the service and has been assigned to other duties. He said the officer had faced employment consequences but the details remained confidential.

"He fully appreciates the gravity and seriousness of what has occurred," Scahill said.

Police said the investigation was particularly focused on the steps the officers took to retrieve the gun.

According to the report, the officer who left behind the gun discovered it was missing while he was driving to the Wellington Airport as part of his official duties.

He then asked his colleague to drive back and get it.

Police didn't elaborate on what he should have done differently, although one option would have been to call officers or other security stationed back at the Parliament.

"We considered a variety of factors, including the potential faster recovery of the firearm," Scahill said.

He said the safety of John Key, who was the prime minister at the time, was not compromised by the actions of the officers. Key has since been replaced in the role by Bill English.