A secret file detailing official investigations into a senior British diplomat named in the House of Commons as a paedophile has been publicly released by the National Archives.

The document about Sir Peter Hayman, prepared for the attention of the then prime minister Margaret Thatcher, was put together during late 1980 and early 1981, before the Conservative MP Geoffrey Dickens used parliamentary privilege to name Hayman as a paedophile in 1981.

The existence of the file, titled Sir Peter Hayman: allegations against former public official of unnatural sexual proclivities; security aspects, was revealed by Sky News earlier this month.

It has now been released to the National Archives in Kew, south-west London, though not yet publicly inspected.

A Cabinet Office spokesman said: “This file was originally kept closed as it contained information from the security services and advice from the law officers. We have reviewed that decision and have now released the file into the National Archives.”

Hayman, who died in 1992, served as high commissioner to Canada. In Dickens’ Commons speech, which was met with criticism at the time as a possible abuse of parliamentary privilege, the MP named Hayman as a member of a ring sharing child abuse images and said the high-ranking diplomat’s involvement in it had been covered up. Owing to Hayman’s sensitive work, Dickens said, this made him a security risk.

The revelations stemmed from the discovery several years before of a package addressed to a Mr Henderson – seemingly a pseudonym used by Hayman – at Hayman’s Notting Hill flat, that was left on a London bus. A police raid on the flat in 1978 uncovered pornographic materials and letters from members of the Paedophile Information Exchange, as well as volumes of diaries which contained fantasies about sexual activity with children.

While the affair was publicised, Hayman’s name was not disclosed. Dickens was prompted to act after Private Eye reported allegations of a cover-up. The file is likely to be of significant interest to campaigners pushing for justice for the victims of historical sex abuse, and may be considered by the current child sex abuse inquiry commissioned by the home secretary, Theresa May.

John Mann, a Labour MP who has campaigned on the issue, called for the file to be provided to the inquiry.

“All of these files that have been classified need to be opened up,” said Mann.

“This one is of great importance. There could well be some very significant information in it and it needs to be looked at.”

This article was amended on 31 January 2015 to correct the date when Sir Peter Hayman was first named as a paedophile.