Andy Coulson's justification for exposing David Blunkett's affair in the News of the World, because he let slip to his married lover there had been a terror arrest, was dismissed in the hacking trial as an "invention".

The former editor was being questioned in the witness box about a meeting in August 2004, when chief reporter Neville Thurlbeck played him hacked voicemails, including one in which Mr Blunkett declared his love for Spectator publisher Kimberly Fortier.

Coulson told jurors that the then home secretary sharing "sensitive" information about terrorism and his visits to GCHQ convinced him there was a public interest in pursuing the story based on hacking.

But the Old Bailey heard the resulting story never contained reference to either. Prosecutor Andrew Edis QC asked the witness: "If it's something the public ought to know why didn't you tell them?"

Coulson said: "I made a mistake." Mr Edis went on: "This public interest stuff is just an invention by you built around the voicemails.

"If the terrorism arrest had mattered to you in the slightest it would have been somewhere in this story but it's not is it? Where is it in this story?" Coulson replied: "My mistake. I took the decision to follow a different path in the story."

He said if he had run the terrorism line, it would have led to calls for the home secretary to resign and "I chose not to do that".

Mr Edis asserted: "What you thought was, this is a cracking story."

Coulson replied: "I certainly thought it was a story and something I had to give proper and serious thought to."

The court heard that around the time Coulson went to Sheffield to confront Mr Blunkett about the affair, he exchanged texts and phone calls with his on-off lover Rebekah Brooks, who was Sun editor at the time. But he denied telling her what he was doing.

He said: "There was closeness between Rebekah and I that the court has heard about but that did not extend to the sharing of each other's exclusives. There was a clear line drawn."