The ambiguous ending of the last Harry Potter book has forced bookie William Hill to pay out on thousands of bets on the fate of the boy wizard.

Wagers on what would happen to him at the end of the seventh and final novel, Harry Potter and the Deathly Hallows, marked the first time William Hill had taken bets on the ending of a book.

Fans who put their money either on Potter dying, killing himself or being killed by his nemesis Lord Voldemort all received a payout.

"Since the book came out, it's been subject to quite a few interpretations," said William Hill spokesman Rupert Adams. "So we paid out on all the bets."

Mr Adams said that the bookmaker handed back £62,000 to punters to cover all scenarios, "every penny that went into the book". It took about 4,000 bets on the outcome, including more than 1,000 online.

The spokesman was relaxed about the payout, saying it was small beer for the company: "When horseracing goes wrong, it can be £2m."

He said this type of "random" betting started in 1980 with wagers on who killed JR in Dallas. "That was the creation of betting on anything. As long as someone has an opinion on something, you can bet on anything," he said.

William Hill took £250,000 in bets then and broke even on the result, with 25 million people watching the final episode of Dallas.

Now the firm is hoping that author JK Rowling does not publish another Harry Potter sequel in the next couple of years. It has already taken £12,000 on that bet.