QUESTION: how do you tell when a political smear story just isn't working? Answer: when your target starts repeating it.

The astonishing thing about the attempt to fit Jeremy Corbyn up as a communist spy was that the press persevered with it long after the story had become a standing joke. The Corbyn-supporting Momentum group even produced a video lampooning the scene in the Daily Mail newsroom. “We can reveal that Corbyn told the spy what Margaret Thatcher had for breakfast”.

Yet, fully a week after the Sun first ran the story about “Corbyn and the Commie Spy”, papers were still trying to claim that the Labour leader had been involved in some kind of communist espionage ring thirty years ago. This was even after the BBC had reported a Czech defence ministry archivist demolishing the story, and after Slovakian media had spoken to the retired Czech agent who made the claims, Jan Sarkocy, and revealed him to be a fantasist.

Not only did Sarkocy claim that Corbyn told him what the Tory prime minister ate for breakfast, he also claimed to have financed Live Aid and the Free Nelson Mandela concert. (Actually, the idea that a communist agent had been involved in the campaign to release Nelson Mandela, who had briefly been a communist party member, is rather more plausible than that he'd recruited Corbyn, who's never been one.) The fact that these kind of attacks are increasingly counterproductive - allegations about Corbyn being an IRA sympathiser didn't damage Labour in the June election - doesn't alter the seriousness of this media misbehaviour.

Certain sections of the press did a massive disservice to journalism last week by mounting a transparent political smear against the leader of the Labour Party, on the basis of a discredited source, and then defending it by claiming the right of press freedom. This wasn't press freedom: it was character assassination. Claiming, day after day, that Corbyn was in some way a traitor to his country - “Corbyn the Collaborator” - without having any legitimate basis for it, is not journalism; it is propaganda. One hates to use the over-wrought cliché of “fake news”, so lets just use an old-fashioned term: the Big Lie. Sections of the established press still seem to believe that the bigger the lie, the more people are inclined to believe it. You just put it on the front page, day after day, and it acquires a kind of validity through repetition. But the truth is that the big lie never worked for long, and in the age of the internet, they are exploded even before they get off the ground.

Now, some of my colleagues in the press will object here that there was a factual basis to the spy-gate story. If a former agent of the Czechoslovakian secret police claims a Labour politician has been an agent, then this is of course news. But it is news of a peculiar kind. The legitimate way to report such a story would be as an amusing aside, or a diary item. Indeed, among the fascinating facts that emerged last week was that the Czech communists also tried to recruit the late Labour MP for Leith, Ron Brown, but couldn't report what he said because they couldn't understand his accent. The Sarkocy allegations certainly provide an insight into the paranoid mindset of the Cold War. They could have been the basis of a nostalgic feature article on how intelligence services worked in the days before the internet and fake news. The lie was to pretend, all evidence to the contrary, that any of it was true.

It was also legitimate for the Sun to report files showing that Corbyn had been given the code name, “COB” and that he had apparently met Sarkocy several times. But it was a malicious distortion to suggest that he was a willing collaborator, let alone a spy, and I'm not surprised the Labour leader summoned his lawyer when a Tory MP tweeted that he had sold secrets for cash. Even if Corbyn had suspected that he was speaking to an intelligence agent that would not have compromised him. It is standard practice for intelligence operatives to pose as diplomatic staff, and it is notoriously difficult to tell one from the other. I've been invited for drinks with diplomatic types eager to know what independence might mean for Nato and nuclear weapons on the Clyde. But I never told them what Alex Salmond had for breakfast.

Moreover, it is common practice for spies to pose as journalists. The genuine traitor, Kim Philby, used as cover his job as a correspondent for the Observer. And no, the Observer didn't give him that cover story because he was a Russian spy, but because they were assured by MI6 that he was one of ours. John le Carre, a former member of British intelligence, writes vividly about the overlap between the intelligence service and the fourth estate in his novel, “The Honourable Schoolboy”. When the press start hurling accusations about politicians collaborating with spies they should beware smashing their own glass house. When it starts using the techniques of communist state propaganda and disinformation to traduce politicians it doesn't like it demeans all of us who work in the media.

The whole concept of press freedom is under attack right now because of the behaviour of a few delinquent sections of the right wing press. In an era increasingly dominated by internet tribes and social media, the very profession of journalism is under threat. We are accused of being a paid lackeys of the mainstream media by people who believe that all “corporate” journalism is fake. Many Scottish nationalist still call the BBC the Biased Broadcasting Corporation, because of its coverage of the independence referendum.

However, with the Corbyn allegations, the BBC acted with responsibility and thoroughness. It used its resources to fact check the spy claim at source (as any responsible newspaper editor would have instructed reporters to do), by interviewing Svetlana Ptacnikova, the head of the Czech Security Services Archive, which keeps the records of the communist years. She spotted immediately that the story was false because Corbyn's file, while it existed along with those of many other politicians, did not identify him an agent who had actually been recruited.

Andrew Neil, the presenter of the Daily Politics, is often attacked as a right wing newspaper editor, but he was lauded by the left on Wednesday for his shattering interrogation of the Tory minister Steve Baker on the spy smear. It’s well worth watching as a masterclass in political interviewing. However, one suspects that Neil would be attacked by the very same people praising him had he been interviewing Dianne Abbott, a close confidant of Corbyn in the 1980s, about the same story. In the new media culture wars there is no longer any neutral territory.

It sounds pompous and self-serving to talk about values in journalism today. The very idea of objective journalism is increasingly dismissed by Millennials as at best the naïve delusion of “centrist dads”, or at worst an apology for an elitist conspiracy against the people. This is precisely why it is so damaging for the established press to behave like a mouthpiece for McCarthyism. They think they know what they're doing, and that politicians will come begging to them, like Tony Blair to Rupert Murdoch. But the game has changed, and they're only hastening their own decline.