A new children’s book about a brave schoolboy who saves a container ship from crashing on to rocks is making waves in North Berwick – even notching up its first celebrity fan.

And now the heroic character, a six-year-old called Charlie, is hoping to help the resort of North Berwick, where the story is set, in real life.

Profits from the tale, A Foghorn Called Charlie, will be donated to help the town repair the severe damage caused by stormy conditions last October.

Edinburgh author, Elspeth MacGregor, started writing the book six years ago. She was inspired by her great-nephew Charlie, who is now 11.

“Charlie used to come roaring into the house yelling his head off,” she said. “I thought his extremely loud voice could perhaps be put to good use.”

One of the first to read A Foghorn Called Charlie is former MP Michael Portillo. He may be a more familiar face on trains rather than ships, but the brightly dressed presenter of the BBC’s Great British Railway Journeys, found it “very charming”.

Mr Portillo, who has frequently visited North Berwick, and has also featured the town in his travelogue spin-off Great Coastal Railway Journeys, described the book as “amusing and original: a witty author teamed up with a brilliant illustrator. A great success and, as a delightful bonus, it is set in North Berwick”.

Elspeth added that Charlie thinks it “cool” that he is the main character in her story, in which the official foghorn breaks down and Charlie, who has an extraordinarily loud voice, is rushed to the Bass Rock by speedboat to warn ships about the danger during an East Coast haar, or thick sea fog. “He has taken the book to school and it was read out in the classroom,’ she explained. 

A Foghorn Called Charlie is illustrated by Katharine Wake, also from Edinburgh, who was suggested by the book’s publisher Sandra Shedden, MD Print and Design. ‘I was eager to find an illustrator who could do black and white drawings in a caricature style to give a more striking and vivid effect, and to enable the young readers to colour in the drawings,’ said Elspeth. ‘Katharine’s drawings hit the spot for me.’

As well as entertaining young readers – who can colour in and make a ‘hero’ badge of their own – it is hoped the book, on sale now, will help the North Berwick Harbour Trust, a charity run by local volunteers. ‘They are in desperate need of cash after the storm damage to the harbour – a huge hole was knocked in the wall,’ said Elspeth.

Jane McMinn, chair of North Berwick Harbour Trust, said: “We are delighted that Elspeth has us in mind for her generous donation and support for the restoration of North Berwick Harbour. This book is unique to North Berwick and another example of the tremendous support for the harbour from all aspects of the community and visitors.”

The repair of the harbour wall has started with the clearing of all the rubble brought down by the force of the waves, and a crane brought in to place large bags of rock on the sea side of the harbour. But Ms McMinn added: “Urgent repairs are needed to two other walls to secure this great community asset and heritage for future generations.  Many thanks to Elspeth for this, and we hope we can continue to work together in the future.”  

A Foghorn Called Charlie is available in North Berwick through Chandlers, Rock and Bird, and the Scottish Seabird Centre for £8, and in Edinburgh at the Post Office in Colinton.