Former Socialist MSP Tommy Sheridan told a friend he attended a sex party at a hotel, a court heard on Friday.
However, the jury was told the former MSP said he did not participate in the event in Glasgow in 2002.
The claims were made at the High Court in Glasgow, where Sheridan is standing trial accused of perjury.
He denies lying to the courts during his successful defamation action against the News of the World in 2006, which followed the newspaper’s claims he was an adulterer who visited swingers’ clubs.
He and his wife Gail are both accused of lying under oath during the civil action.
SSP member Keith Baldassara, Sheridan’s former election agent, told the court of a meeting he had with Sheridan at Glasgow City Chambers, at which he raised the issue of the alleged event at the hotel.
Their discussion was said to have happened in the days after the Glasgow wedding of Gail Sheridan’s younger sister to Andrew McFarlane.
Baldassara, who was one of three best men at Sheridan’s wedding, told the court: “What I said to Mr Sheridan was it came to my attention that he had attended an event at a hotel in Glasgow the evening before Andy and Gillian’s wedding.
“I’d actually heard Andrew McFarlane talking about a sex party in a room at this hotel that he had described as a night of madness, having group sex with a woman who had been flown in.
“I raised with Tommy my concern about that being spoken so publicly and so openly by Andrew McFarlane.”
Baldassara said Sheridan told him he had attended the event.
The witness told the court: “The response he made was that it was a night that was put on for Andy.
‘It involved a group of people, swingers, there by their own accord. It wasn’t about sex being bought or paid for and therefore had no involvement in prostitution, which was concerning me.
“Tommy said he attended the event but didn’t participate.”
Baldassara also told the court he had a “furious row” with Sheridan on a different occasion about a visit to a sex club in Manchester.
He said the exchange happened in October or November of 2002 as they made their way in Sheridan’s car to a vigil for a young Asian man who had been murdered.
The witness said: “Mr Sheridan had raised with me that there was the possibility of information coming out in the press regarding a visit to a sex club in Manchester.
“He was letting me know because I previously challenged him about it.
“I then raised with him our discussion about this almost a year ago and we were quite clear it wouldn’t be repeated.
“He told me that it was repeated but there was nothing to be concerned about because he went with somebody he suggested was his wife.”
Baldassara said a “furious row” then took place between the two men.
The witness said: “I just thought it was crazy to repeat the visit there.
“He said there was nothing to be concerned about because nobody could prove it and it was left at that.”
Earlier, the court heard how lawyers for the News of the World arranged for a psychiatrist to see a witness in the 2006 defamation case.
Jurors were told Fiona Maguire was examined once the case got under way.
The current trial heard previously that Ms Maguire was paid £20,000 for a story about Tommy Sheridan and an alleged four year affair.
Kenneth Lang, a lawyer for the Scottish News of the World, told the court today Ms Maguire was a “fragile individual”.
He said: “I think I arranged for her to be medically examined, by a psychiatrist possibly. It was during the course of the trial.”
Lang, who agreed the move could have come three days into the action at the Court of Session, said: “She was a fragile individual. I think it was considered among the legal team that that was the appropriate course.”
Sheridan, who is representing himself, questioned whether there were concerns about Maguire’s mental health.
Lang said: “I think she reported to me that she had concerns of that nature.
“I think it possibly became a more anxious matter once we got to the jury trial.”
During Lang’s evidence, the court also heard more than £4,500 was spent on two witnesses, Anne Colvin and Helen Allison, “during the waiting for” the original trial.
The court was shown bills for a five-day stay in Edinburgh, which included accommodation, food and bottles of champagne.
Jurors heard the overall bill included £1,950 on a car for the women, whose hotel was said to be five minutes from the court.
Lang told the court he thought his firm had made the hotel booking and it was “possible” his firm’s credit card had paid for the stay.
Addressing Sheridan, the lawyer said: “Halfway through the evidence of Anne Colvin, you dismissed your lawyer and obviously that prolonged matters.”
Sheridan and his wife Gail, both 46 and from Glasgow, deny the charges against them.
The former Socialist MSP won £200,000 in damages after the newspaper printed the allegations about his private life.
The trial, before Lord Bracadale, continues on Wednesday.