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 and X Factor judge 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 Louis 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 Louis.

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

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

Louis' lawyer Paul Tweed confirmed his client would be paid damages of 500,000 euro, along with his legal costs. Louis 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.

But he 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.