Lynette White officer Richard Powell 'demanded apology'
A retired police officer demanded "a complete and absolute" apology after he was arrested and accused of helping to "fit up" five men for murder.
When interviewed in 2005 about the Lynette White case Richard Powell said it was a "complete fabrication" he had threatened a witness.
He and seven other former officers deny perverting the course of justice at Swansea Crown Court.
Three men were wrongly jailed for killing Ms White in Cardiff in 1988.
Mr Powell was an inspector when Miss White was stabbed to death in a flat at James Street in the city.
Five men later stood trial and three were convicted and jailed for life.
Their convictions for murder were quashed by the Court of Appeal in 1992 and they were released.
In 2003 advances in DNA led to the arrest of Jeffrey Gafoor, who admitted murder and is serving a life sentence. He said he had acted alone.
A fresh investigation was then launched into how the five men came to be charged.
The jury at Swansea crown court heard that Mr Powell had been a divisional inspector in 1988 and had been involved in the early stages of the inquiry.
Mr Powell was arrested in July 2005.
The jury was played tapes of his interviews after arrest.
It was put to him that Mark Grommek, a witness in the original trail, had alleged Mr Powell had threatened to put him in jail unless he provided the statement that officers wanted.
Mr Powell told the arresting officers it was a lie and that he thought he had never been involved in the interviewing of Mr Grommek.
"He is a proven liar. As far as I know when I was called back in all this [the interviewing of potential witnesses] had been done. I was not involved. This does not mean anything to me," he said in interview.
Mr Powell said the investigation was handled by "serious crime squad individuals" but because he knew the area he was able to feed information into the inquiry.
He described the allegations as "a complete fabrication" and said that if they were looking for a scapegoat they had picked the wrong man.
"I am being unlawfully detained here. I want a complete and absolute apology. If they had done their homework I would not be sitting here today. I shouldn't be here."
Mr Powell said he had kept a meticulous diary and if the officers could find it, and his pocket notebooks from the day, they would be able to see that he had not been involved in the interviewing of Mr Grommek.
Mr Powell, aged 60, said he had gone on to be promoted to superintendent and had retired in 2003 with a certificate from the chief constable thanking him for his exemplary service.
The trial continues.