Scottish TV channel STV has apologised after it apparently announced the result of Saturday night’s The X Factor phone vote online before the poll had closed.

The website of the channel posted a story saying that Amelia Lily had won the public vote to replace Frankie Cocozza on the show – but the story ran an hour early, prompting angry fans to accuse the programme of vote-fixing.

One viewer, Darren Ruback, tweeted, “Not sure how the result has been leaked by STV when ITV are still asking you to call. Fix!”

And another, Jade Blackburn, said on Twitter, “Apparently Amelia is already the winner of tonight’s vote but I wanted 2 Shoes back!”

The channel later said the blunder was due to a technical problem, adding that pre-written pieces about all four contestants had been published on the site.

“Ths STV web team prepared stories regarding each contestant in anticipation of the result, and due to a technical hitch all four stories went live on our website.

“We would stress that this was purely a technical hitch and for this we apologise.”

Amelia returned to the show with 48 per cent of the public vote, ahead of previous finalists 2 Shoes, Jonjo Kerr and James Michael.