X Factor judge Louis Walsh has settled a 500,000 euro (£403,500) defamation action against News Group Newspapers in Ireland.
The out-of-court deal was reached after the music mogul sued The Sun over a story last year based on a false allegation that he sexually assaulted a man in a Dublin night-spot.
Unemployed dance teacher Leonard Watters was jailed for six months in July for wrongly accusing Walsh of groping him in a celebrity nightclub after a Westlife concert in April 2011.
Eoin McCullough, senior counsel for News Group Newspapers, read a statement to the High Court in Dublin apologising to Walsh.
"The Sun published an article in its editions of 23 June 2011, in which we reported that Louis Walsh was being investigated in relation to a sexual assault on Leonard Watters," he said.
"In fact it transpired that Leonard Watters had made a false statement to An Garda Siochana, and he has since been convicted in relation to this matter.
"The Sun fully accepts that the alleged assault did not occur in the first place and Louis Walsh is entirely innocent of any such assault.
"The Sun unreservedly apologies to Louis Walsh for any distress caused to him as a result of our article."
Walsh took legal action against the Murdoch group for damages over the article published on June 23 2011 with the headline "Louis Probed Over 'Sex Attack' on Man in Loo".
The paper accepted the accusation was false but initially denied defamation, saying that it had acted fairly as the story was based on police inquiries in to the allegation.
Outside court, Walsh said he would not have wished what happened to him on his worst enemy.
"I'm very relieved," he said.
"This has had a terrible effect on me guys. It was all lies.
"And I'm very satisfied with this total vindication for me, but I remain very angry at the treatment I received at the hands of The Sun."
Walsh's lawyer Paul Tweed confirmed his client would be paid damages of 500,000 euro, along with his legal costs.
"This headline story should never have been published," Tweed said.
"Although the person who fabricated the story has since been convicted in the criminal courts, this is a prime example of the serious damage that can be inflicted on an individual, whether they are well known or not, by the publication of totally unfounded allegations which, in the age of the internet, can circumnavigate the globe in a matter of seconds.
"The serious consequences of worldwide dissemination online of a defamatory story is a fundamental problem which Lord (Justice) Leveson's report, to be published tomorrow in the UK, will hopefully address on the principle that prevention is always better than cure."
Walsh said he felt vindicated by the settlement and said that the story had started with The Irish Sun.
"I have the utmost respect and time for most journalists with whom I've always enjoyed a good relationship," he said.
Walsh said he remained angry at the way he was treated by the paper.
"I am therefore absolutely gutted and traumatised that these allegations against me should have been published, particularly as I had made it clear at the time there was not one iota of truth in them, that I was totally bewildered as to who would have made up this type of story," he said.
"Although the perpetrator has since been convicted as a result of concocting the allegations this didn't stop the story being spread all around the world as a result of The Sun's headlines."
He added that while no amount of money would compensate him for what he had been through he was glad to have achieved a decisive and categorical settlement.
The case was settled before the President of the High Court in Ireland, Mr Justice Nicholas Kearns, the day before Lord Justice Leveson's report on media standards and ethics is published.
Watters, a 25-year-old father of two, alleged he had been sexually assaulted by Walsh in a toilet at Krystle nightclub. His first complaint was made to police outside the club within hours of the false attack.
Watters was later examined in a sexual assault unit, which revealed bruising in his genital area.
It was about two months before a formal statement, later found to have been false, was made to gardai.
Lawyers for the music promoter claimed a crime writer with the Irish edition of The Sun, Joanne McElgunn, met Watters in a hotel on June 15, bought him dinner and offered him a sum of money on behalf of the newspaper if he agreed to make a complaint to police about being assaulted by Walsh.
It was also alleged that the journalist travelled with Watters to Pearse Street Garda station in Dublin so he could make the agreed complaint against Walsh, and that Watters was paid 700 euros and promised further payments after the story was printed.
When the official complaint was made, The Sun and the Irish Sun printed the story before Walsh was questioned under caution.
He vigorously denied the accusation.
Within days, investigators had shown Watters CCTV footage from the club that disputed his claims and he admitted he had made up the allegation.
Watters, from Navan in Co Meath, was arrested, charged and publicly apologised to Walsh for the unfounded claims. He was recently released from jail.
Michael McNiffe, former Irish Sun editor, resigned last month.
No one from the newspaper group was in court for the brief hearing.