X Factor winner Joe McElderry has come out as gay just weeks after he claimed that he was straight.

Earlier this month, pranksters hacked into his Twitter account and posted messages including: “It’s been difficult living a lie for so many years…”

Despite denying publicly that he was gay, the incident prompted him to come out to his mother.

Today, on his official website, he said: ‘I have always been a very honest person and so it is important for me to continue to be honest.

“It has been the most amazing year so far and I feel so privileged. It’s also been a time of real self realisation and I feel as if I have grown up so much in these few months.

“There has been speculation about my sexuality in the past and I have always been honest at the time I have been asked.

“Over the past few weeks I have really had time to reflect and to realise who I am. I spoke to my friends and family about this in the last few days and it was important to do the same for you all as you have been so supportive.

“I have had nothing but support from you and many of you have been very open in saying that you will continue to support me whatever my sexuality. It is important to me to let you know first, so that you know the stories in the papers are true. I made the choice to speak openly about this.’

He added: “Everything is going well and I’m really happy to be able to move forward from here.

He told The Sun that the Twitter incident was the catalyst for him to realise he is gay: “I think the Twitter thing was the point when I realised I was gay. I’m feeling good about it, it’s liberating. Now I can just get on with my life.”

McElderry had a girlfriend while at school but was the target of homophobic bullies. “Actually, my feelings have changed,” he said. “This is how I feel now.”

X Factor judge Simon Cowell has offered McElderry his full support.

McElderry follows in the footsteps of Will Young who came out as gay immediately after winning the precursor to the X Factor, Pop Idol.