LONDON — A judge on the Great British Bake Off, a widely watched television cooking competition in the U.K., has been forced to apologize after revealing the winner hours before the final episode was scheduled to air.

Prue Leith posted the name of the winner on her Twitter feed while traveling in Bhutan, which is six hours ahead of Britain, thinking fans had already seen the last installment.

The show airs at 8 p.m. Tuesday in Britain.

Leith, 77, later tweeted: “I am so sorry to the fans of the show for my mistake this morning. I am in a different time zone and mortified by my error.”