Image caption Jan Mrazek describes the blackmail idea as "absolutely nonsense"

In the 1970s, a Czech spy claimed that his colleagues had hatched a plot, a decade earlier, to blackmail future Prime Minister Edward Heath. But a search of Czech archives yields no evidence for this claim - so could the story have been made up by Heath's Conservative rivals to hint that he was gay?

The rumour began percolating in Westminster from the start of the 1970s and by 1975 it had found its way into print. A Czech defector, Josef Frolik, was claiming that there had been a plan a decade earlier to blackmail Edward Heath into being part of a communist spy ring.

A fellow spy in London named Jan Mrazek had come up with the plan, Frolik said. Mrazek was said to have questioned Heath's unmarried status and concluded that the then-up and coming cabinet minister would be vulnerable to homosexual blackmail.

The plan, it was said, involved exploiting Heath's love of music by training a virtuoso organist named Reinberger.

The organist would meet Heath in London and invite the British politician back to Prague, where the trap would be sprung.

Frolik said that only a last-minute warning from MI5 prevented Heath from making the trip.

Image caption Security files are more accessible in the Czech Republic than in the UK

When Frolik's book was published in 1975, Heath, who had just lost his position as prime minister and leader of the Conservative Party, angrily denied what had been christened "the Heath caper", saying he would consult his lawyers.

But was the story true? Was there really a plot?

The Jan Mrazek I met in a village 20 miles from Prague is now in his eighties but his English is still good. At his country cottage, he confirms that in the early 1960s he had indeed been a spy working out of the Czech embassy in London.

He also says Czech spies did carry out blackmail plots against British politicians. But he describes Frolik's story about the Heath caper as "absolutely nonsense".

He was too busy running another agent, a Czech man betraying dissidents in Britain. He says he never knew Heath and never dreamed up a plot.

But is he telling the truth?

Investigating a Cold War spy story in the Czech Republic is easier than it would be in almost any other country. After the end of the Cold War, the archives of the Czech Security Service were opened to the public. With help from the staff and the assistance of a translator, we begin to pull up hundreds of pages of files - some electronic, some on microfiche.

Image caption Heath, a keen pianist, had been an organ scholar at Balliol College Oxford

Mrazek's own voluminous file documents his entire career in huge detail, including two stints in London. There is no sign of a plot.

Nor is there any evidence of one in all the correspondence files between Prague and London. There is no file on Heath. There is one on the organist Reinberger but it contains no evidence that he was ever recruited for a blackmail plot against Heath.

The only time he came across the radar of the Security Service, it seems, was when they thought he might be in contact with a Czech exile in the West.

Reinberger died many years ago but an email from his son says the family do not believe he ever knew Ted Heath and they believe the story is false.

Given the openness of the Czech archives, it is somewhat ironic that when I use the Freedom of Information Act to ask for some files on Frolik held in Britain's National Archives, my request is refused.

A lengthy reply from the Cabinet Office provides me with a string of reasons why the documents from the prime minister's office remain closed to the public. The archives of the British Security Service are closed to outsiders but an authorised history has been written.

There is no record of any warning being given to Heath about a plot - another piece of evidence pointing to Frolik's story being fabricated.

If the story was fabricated, it leaves an interesting question. Why would Frolik - who defected to the US - fabricate and insert a story into a book that was damaging to a British Conservative politician?

Find out more You can listen to The Heath Caper on BBC Radio 4 at 11:00 BST on Monday 25 June or listen again via the Radio 4 website Listen to The Heath Caper MI6: A Century in the Shadows GCHQ: Cracking the Code

Jan Mrazek has one startling theory. He tells me that he was present at a meeting after the end of the Cold War when Heath told a Czech minister that the story had been created by a "British right-wing organisation" in order to undermine his position as leader of the Conservative party in the early 1970s. Is such a claim really plausible?

In the Cold War, hidden hands were frequently involved in memoirs written by defectors such as Frolik.

Such books could be useful vehicles to score points and reveal who might have been on the other side's payroll. And in the case of Frolik's book there is evidence that people with links to the shadowy nexus between the intelligence world and politics were involved.

Frolik's publisher, Leo Cooper, told me he was sure the security and intelligence services had a hand in the book.

He also recalls right-wing MPs, linked to the intelligence services, asking him if Frolik had material which could be useful for Margaret Thatcher in her campaign for the leadership of the Tory Party - although he recalls this being "dirt" about Labour and the Trade Unions.

There is no suggestion that Mrs Thatcher was aware of, or involved in any of these machinations.

The book only came out in 1975 but rumours had been swirling for years before.

He didn't approve of Ted Heath - Ted Heath was part of the reason that pushed him to the right Anthony Cavendish on MI6 colleague George Kennedy Young

"I first heard about it not long after I became Mr Heath's principal private secretary at Number Ten in 1970, just shortly after he became prime minister," recalls Robert, now Lord Armstrong.

"It came up in conversation very briefly with him, on one occasion, but nobody really took it very seriously. It was absolutely clear that as far as he was concerned it was an allegation absolutely without foundation. It didn't worry him." Armstrong says he never saw any evidence that Heath was gay.

There was some thought at the time that this might have been a smear by the Czechs or the KGB to attack Heath - but that would not explain why it would appear in a book by a defector who was working closely with the CIA and others opposed to communism in the West.

Mrazek cites George Kennedy Young as a likely conspirator. George Kennedy Young was a former deputy chief of MI6 turned Conservative candidate who was particularly active on the right of the party, notably in trying to take control of The Monday Club - a right-wing Tory party pressure group.

Mrazek met Young in the 1960s and believes this is why he was singled out to have been behind the Heath Caper. Young certainly disliked Heath intensely - as did others on the right who believed he had sold out and needed to be replaced.

Young, who died in 1990, was so convinced the country was going in the wrong direction under Harold Wilson he became involved in plotting for a potential coup, setting up communications links with other sympathisers.

"He didn't approve of Ted Heath," a former colleague from MI6 Anthony Cavendish told the BBC.

"Ted Heath was part of the reason that pushed him to the right."

Cavendish believes Young might have supported right-wingers against Heath but doubts whether he would have gone quite so far as to plant a smear in Frolik's book.

Many of the key protagonists have since passed away and so proving definitively that the Heath Caper was indeed a Westminster political smear rather than a Czech Secret Service plot is almost impossible - perhaps a fitting end for a story which itself began in the realms of conspiracy and rumour.

You can listen to The Heath Caper on BBC Radio 4 on Monday, 25 June at 11:00 BST or listen again on the Radio 4 website.