British writer J.K. Rowling continues to work magic, with a handwritten book of her fairy tales selling for more than $4 million Cdn in London Thursday.

The Tales of Beedle the Bard, a book of fairy tales mentioned in Harry Potter and the Deathly Hallows, was expected to sell for about $100,000 Cdn.

A Sotheby's staff member displays the manuscript The Tales of Beedle the Bard by J.K. Rowling. A Sotheby's staff member displays the manuscript The Tales of Beedle the Bard by J.K. Rowling.
(Sang Tan/Associated Press)

However, bidding at Sotheby's auction house in London soared to £1.95 million ($4.04 million Cdn) with London art agent Hazlitt, Gooden and Fox the successful bidder on behalf of online book giant Amazon.com.

Amazon revealed later on Thursday that it had crossed over from the sales side to become buyer for the rare tome, with a spokesman saying the company is planning to take The Tales of Beedle the Bard on tour through libraries and schools.

The company has also posted on its website a host of large, close-up photos of and from the book — for which Rowling also created the illustrations — as well as staff reviews of the tales inside. Staffers will also answer questions fans have about the book via on online discussion board.

The money raised will benefit Rowling's charity The Children's Voice, which helps children in care in Eastern Europe and has plans to extend its reach to other parts of the world.

"This will mean so much to children in desperate need of help," the author said in a statement. "It means Christmas has come early to me."

Rowling created seven copies of The Tales of Beedle the Bard, wrote and illustrated it herself by hand and had it bound in leather studded with silver and jewels.

Only one copy will ever be sold, she said. The others will be given to people closely connected to the Harry Potter novels, which have sold 400 million copies worldwide.

"The Tales of Beedle the Bard is really a distillation of the themes found in the Harry Potter books, and writing it has been the most wonderful way to say goodbye to a world I have loved and lived in for 17 years," Rowling said.

In the seventh book of the boy wizard series, The Tales of Beedle the Bard was left to Hermione Granger by Hogwarts head teacher Albus Dumbledore.

It provided very puzzling clues to help Harry and his friends defeat his nemesis Lord Voldemort.

The dedication written in the front of the book says: "Six of these books have been given to those most closely connected to the Harry Potter books during the last 17 years. This seventh copy will be auctioned, the proceeds to help institutionalized children who are in desperate need of a voice.

"So to whoever now owns this book, thank you — and fair fortune be yours!"

With files from the Associated Press