Prime Minister John Key says he will write a letter of support if necessary for the police officer who left his gun in a Parliament toilet.

Prime Minister John Key has backed a member of his protection squad who left their loaded gun in a Parliament toilet, describing the man as "the most professional guy I've dealt with".

Police are investigating how a loaded glock pistol was left behind in a bathroom at Parliament last week, describing it as "a regrettable incident that we are taking seriously".

The gun was recovered by police after they became aware it had been left behind.

ONE News A protester who drove his car onto Parliament's forecourt is "a far more worrying factor", John Key says.

Key was not at Parliament when the gun was found, but confirmed it belonged to a member of his diplomatic protection service.

READ MORE:

* Police gun left in Parliament bathroom

* Man charged with arson after Budget day Parliament protest

* No bail for man who locked down Parliament on Budget Day

* Parliament lockdown accused seeks bail after Budget day protest

The man had been part of Key's security detail for eight years - "as long as I've been Prime Minister" - and was "utterly professional", Key said.

"He's the most professional guy I've dealt with, he's just made a catastrophic error and it's pretty awful for him because he's not that kind of guy, he doesn't make mistakes easily and unfortunately that's happened."

The man had apologised to Key and was "utterly mortified", but it was simply a human error.

"In his field of work, that's something he has with him, a gun, but ministers could leave cabinet papers on a plane and...I wouldn't be happy, but I'd understand."

Key would not comment on whether the man was still part of his security detail, but said he was happy to write a letter of support for him if asked by police.

He remained concerned about wider security issues, saying the protester who was able to drive a car loaded with fuel onto Parliament's forecourt was a "far more worrying factor".

"If that had been packed with a fertiliser bomb or something, then that represented a real threat...to people that were in quite close to that vehicle."

The Parliamentary Service had been looking into the broader issue of security around Parliament, and were installing retractable bollards at all vehicle entrances.