Roald Dahl, the author of some of the best-loved children’s books from Matilda to The BFG, has reached No 1 in the UK book charts for the first time.

The Great Mouse Plot, in which a young Dahl and his friends play a trick on the “loathsome” Mrs Pratchett, a “small, skinny old hag” who runs the sweet shop in his hometown of Llandaff, Cardiff, sold 32,096 copies this week, according to the official book sales monitor, Nielsen BookScan.

Published for World Book Day, the story – itself an extract from Dahl’s childhood memoir, Boy – tells of the author and his friends deciding to teach Mrs Pratchett a lesson when they find a dead mouse under a floorboard at school. “It was I and I alone who had the idea for the great and daring Mouse Plot,” recounts Dahl. “We all have our moments of brilliance and glory, and this was mine”.

The Great Mouse Plot beat another World Book Day title, Star Wars story The Escape, to the top spot, also coming in ahead of bestselling titles by Mary Berry, Jeffrey Archer and Philippa Gregory.

According to The Bookseller, Dahl almost landed a No 1 in 2005 with another World Book Day title, Roald Dahl’s Incredible Chocolate Box, but despite selling over 44,000 copies it was beaten to first place by Dan Brown’s thriller The Da Vinci Code.

Although this week marks Dahl’s first official No 1 in the UK, the author, who died in 1990, has sold over 10m copies of his books in the country since Nielsen’s book sales records began in 1998.

Francesca Dow, Managing Director of Penguin Random House Children’s, said: “Roald Dahl was a great believer in the thrilling power of a good story and I am thrilled that through World Book Day so many children will be discovering his mischievous tricks and magical storytelling for the very first time. It is the most wonderful way to begin our Roald Dahl centenary celebrations.”