Louis Walsh has settled a €500,000 defamation action against the Irish edition of The Sun newspaper.

The out-of-court deal was reached after Mr Walsh sued The Irish Sun over a story last year based on a false allegation that he sexually assaulted a man in a Dublin nightclub.

Unemployed dance teacher Leonard Watters was jailed for six months in July for wrongly accusing Mr Walsh of groping him 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 Mr Walsh.

He said: "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.

"In fact it transpired that Leonard Watters had made a false statement to An Garda Síochána, 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 apologises to Louis Walsh for any distress caused to him as a result of our article."

Speaking outside the High Court, Mr Walsh said he would not have wished what happened to him on his worst enemy.

He said: "I'm very relieved. 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."

"I have the utmost respect and time for most journalists, with whom I've always enjoyed a good relationship.

"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.

"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."

Mr Walsh 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.