Deadly secret: how a New Zealand teenager attempted to assassinate the Queen.

When a loud crack echoed through the crowd gathered to greet Queen Elizabeth II in Dunedin in 1981, the media began to ask questions. Just a falling signboard, authorities assured them. Or a firework.

But the truthful answer has remained secret until now.

According to intelligence documents obtained by Stuff, the crack was a gunshot from a .22-calibre rifle, one fired in a brazen, ill-conceived attempt to assassinate the monarch during her Royal tour.

While claims about the attempt have surfaced before, these declassified documents not only confirm that it took place, but suggest that New Zealand police actively worked to cover it up.

Queen Elizabeth II during the 1981 New Zealand tour. Image: Getty.

The man who pulled the trigger that October 14 afternon was a 17-year-old named Christopher John Lewis.

The teenager had positioned himself in a toilet on the fifth floor of a building overlooking the path of the Royal motorcade. From there he fired his single shot.

Thankfully, no one was injured.

According to the documents quoted by Stuff, the New Zealand Security Intelligence Service later concluded Lewis didn't have an appropriate line of sight or a powerful enough weapon to reach his target. His intentions, though, were clear.

Yet despite a rambling confession and evidence of the gunshot, charges of treason were never pursued against him. Lewis was later jailed for three years on firearms offences, with police telling media that he had simply shot at a road.

The deception was part of a concerted effort by police to keep the assassination attempt secret, presumably out of fear the security lapse would cost New Zealand further visits from the Head of State.

"Current police investigations into the shots have been conducted discreetly and most media representatives probably have the impression that the noise was caused by a firework of some description," the NZSIS report said, according to Stuff.

"There is a worry, however, that in court the press may make the connections between the date of the offence and the Queen's visit."

Lewis went on to commit a series of armed robberies and was charged with murder, before he took his own life in Mt Eden prison in 1997 at the age of 33.

New Zealand Police are investigating suggestions of a cover-up.