LONDON — The current season of the much-loved amateur baking show “The Great British Bake Off” came to an end on British television last night, in a finale that rose to the occasion.

But by the time it aired, some viewers already knew the name of the winner. One of the judges, Prue Leith, had mistakenly tweeted about it.

On Tuesday morning, 10 hours before the recorded episode went on the air, Ms. Leith, a chef and writer, tweeted, “No one told me judging #gbbo final would be so emotional. I wanted them all to win.” She then congratulated the winner.