Young writers had a story to tell when Wayne Rooney made a shock appearance at a library prize-giving.

The stunned children were open-mouthed when the football megastar popped up from behind the book shelves at Wilmslow Library to present prizes for a story writing competition.

Seventy children aged eight to 11 wrote stories with a football theme and sat patiently waiting to hear who had won. But there was uncontrollable excitement when the England and Manchester United captain, who lives in Prestbury, appeared to announce the winner and runners-up before chatting with the children and having photos with them.

Librarian Marg Charlesworth said: “Having Wayne take time out to attend this evening is far more than we could have wished for. The children were absolutely thrilled.”

It was an exciting climax to the competition for winner Ajmain Alam, nine, from Gorsey Bank Primary School, who wrote the winning story ‘John’s Magic Gloves’, and was presented with a published copy of his book signed by the United striker.

Ajmain’s dad John said: “He loves football and plays in goal for the under-nine’s team at school and with the Wilmslow Academy. He is a bit overwhelmed by it all. Meeting Wayne Rooney has been the highlight of his year.”

Sarafina restaurant sponsored the event and paid to have Ajmain’s story turned into a bound book with illustrations. Copies of the book autographed by Rooney have gone on sale with proceeds going to the ambulance service charity CardiacSmart to raise funds for a defibrillator.

The library scored the high-profile appearance thanks to Wilmslow Football Academy founder Erik Garner, a lifelong Manchester United fan, FA coach and football scout, who set up the writing competition and dipped into his contacts book to call in a favour.

Erik said: “I spoke to Wayne and he didn’t hesitate to offer his support and come along to hand out the prizes. The stories have been fantastic and the children have shown great imagination.”

Coun Paul Bates, Cabinet member for communities and health who is in charge of libraries, thanked the football star for coming along.

He said: “To have one of the world’s most famous footballers support our library and the work we do with children in terms of literature, reading and writing, is simply fantastic and I’m grateful to Eric Garner for his hard work arranging this.”