Louis Walsh has said that getting the boot as X Factor judge in 2007 by Simon Cowell over his age was a “big mistake”.

Walsh was axed in 2007 but quickly reinstated. However Walsh will be quitting the talent show after this year’s series.

Walsh told the Radio Times: “I was gutted.”

“I couldn’t believe I was off the show – me and Kate Thornton (presenter). I was sure I was safe.”

The Irish judge, who believs ageism played a part, continued: “Somebody in ITV got into Cowell’s ear, and told him to make it younger and fresher. It was an age thing.”

Walsh was replaced by US dancer and choreographer Brian Friedman before he was asked to return.

He continued “They gave Brian Friedman the job, who was brilliant as a choreographer, but he wears these silly clothes all the time. Sharon (Osbourne) sent me a text on day one saying, ‘It’s not working. You could get your job back.’

“Then I had to wait. Simon rang me and said: ‘There is a possibility that you could come back,’ but then he said, ‘You cannot tell anybody.’ You can’t tell me not to tell anybody. I like to tell!”

Speaking of memorable X Factor moments Louis recalled the incident were Sharon drenching him with water in 2005: “I said, ‘Are you taking Ozzy’s drugs?’ or something, and she went crazy. It was a terrible thing to do. A live show, all these wires and electricity, and water?! I could’ve been electrocuted! But that’s Sharon. She’s good TV. You never know what she’s going to say or do.”

X Factor returns to our screens at 8pm on Saturday on ITV1.