Image copyright Keystone Image caption Sir Peter Hayman was a British diplomat who served as High Commissioner to Canada

A top British diplomat engaged in "sexual perversion" in the 1960s and was vulnerable to blackmail by foreign powers, previously secret papers say.

Sir Peter Hayman kept "explicit records of his sexual activities and fantasies", a file from the 1980s said.

Some fantasies related to children, but had not been acted on, a Cabinet Office briefing to then-Prime Minister Margaret Thatcher said.

Hayman, who served as High Commissioner to Canada, died in 1992.

Hayman, who also worked for MI6 and has often been described as an intelligence services "operative", was a member of the Paedophile Information Exchange, the security briefing said.

Package on bus

But it found "no evidence" Hayman had sought to "approach children for sexual purposes".

And foreign security services had not been aware of his "vulnerabilities", the file, made public for the first time on Friday, concluded.

In 1978, Hayman left a package containing paedophilic literature on a bus and was investigated by the police.

They found similar material when they raided his flat.

However, he was never charged, to the dismay of Conservative MP Geoffrey Dickens, who raised the case in Parliament in 1981.

The file contains "lines to take" for government officials when asked questions by the media about Hayman's 1978 arrest.

One of these was that there had been "no cover-up".

'Unnatural sexual proclivities'

BBC home affairs correspondent Tom Symonds said that while much of what was contained in the file had been widely reported in the 1980s, the fact that it had been made public was significant.

"This file has been released after just a week of pressure from media and other people after it was discovered in a Kew public records office database," he said.

"It shows there is a lot of pressure for this sort of material about historical child abuse to be revealed."

The briefing file, covering the end of 1980 and the start of 1981, is entitled "SECURITY. Sir Peter Hayman: allegations against former public official of unnatural sexual proclivities; security aspects".

It was held by the Cabinet Office, but marked "closed" until it was released to The National Archives at Kew, south-west London, on Friday.

The file does not appear to have been uncovered by a review of historical government child abuse records conducted last year by Peter Wanless, the head of the NSPCC.

His report claimed to have made enquiries widely across the government estate and other public services, including the Cabinet Office, where this file was being held.

The Home Secretary Theresa May has suggested Mr Wanless may have unearthed a copy but not the original file.