A senior official in the Scottish Socialist Party has said that former leader Tommy Sheridan admitted to him he had gone to a swingers' club.
Alan McCombes said the case was a "squalid squabble"
Alan McCombes told the Court of Session the admission was made in 2002.
He was giving evidence "under the strongest possible protest" in Mr Sheridan's £200,000 action against the News of the World newspaper.
The Glasgow MSP is suing over allegations that he went to swingers' clubs and participated in orgies.
Shortly after being sworn in, he told Michael Jones QC, representing the News of the World: "I am here under the strongest possible protest.
"Your client, I have to say, the News of the World, symbolises everything that as a socialist I have stood against my whole adult life."
Mr McCombes described the case as a "squalid little squabble".
"It should have been settled by one of both parties before innocent people were dragged into this bizarre pantomime," he said.
The judge, Lord Turnbull, warned him that he was in court to give evidence, not speeches.
Mr McCombes said he was in court to defend the integrity of his party and its office-bearers.
He was jailed in May for refusing to hand over the minutes of an SSP meeting in November 2004 which contained concerns about Mr Sheridan's position in the party.
The case, now in its fourth day of evidence, continues.