In October 1981, Queen Elizabeth took a trip to New Zealand.

Her week-long tour included a visit to a science fair in Dunedin. On her way, she stepped out of her motorcade to greet onlookers.

That's when 17-year-old Christopher Jones Lewis decided to act, recently released records say.

According to the records, the troubled teenager wanted to kill the queen. The morning of her visit, he loaded a gun and joined the crowds of onlookers. As she passed, he fired a single shot.

He didn't have a good vantage point of a sufficiently high-powered rifle, the newly released records say. The bullet probably passed high above the crowd. “Lewis did indeed originally intend to assassinate the Queen, however did not have a suitable vantage point from which to fire, nor a sufficiently high-powered rifle for the range from the target,” a 1997 SIS memo read. It was declassified in response to a request by Australia's Fairfax Media.

Journalists and onlookers heard the noise, but police assured them that it was just a firecracker or maybe a toppled sign. “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,” said a November 1981 memo from SIS, also released Thursday.

Police played down the incident, charging Lewis only with possessing a weapon in public.

It took more than three decades for the information to come out, prompting questions about whether authorities at the time mishandled the case to avoid embarrassment for the country hosting the royal visit. In a statement to Reuters, a New Zealand police spokesman said the police commissioner had ordered the case file to be reexamined.

Lewis, who was described as “severely disturbed” in the memos, was watched closely by authorities during the Queen's 1986 follow-up visit. (Although New Zealand has been independent of British rule since 1947, the queen remains the constitutional monarch and the head of state.)

At 33, he electrocuted himself in prison, leaving behind a suicide note. At the time, he was on trial for the murder of an Auckland mother and the abduction of her baby.