HE had travelled through time and space – well, from Cardiff actually – to give schoolchildren in north Hampshire the surprise of their lives.

Actor Matt Smith, who plays the time-travelling Doctor in Doctor Who, popped into Oakley Church of England Junior School for the worldwide premiere of a mini-episode written by four of the school’s pupils.

Adam Shephard, Daniel Heaton, Ben Weston and Katie Hossick won the BBC’s Script to Screen competition for their three-minute tale about the famous Time Lord meeting scientist Albert Einstein, which will be shown on Saturday.

Children from Years 5 and 6 were sat patiently in rows in the school hall, waiting for the episode to start, when the 28-year-old star of the show walked in from a side room and the room erupted in screams and cheers.

Afterwards, Matt, who has been filming the Christmas special, told The Gazette: “It was wonderful. That is the best thing about this job – the reaction of the children.

“As an episode of Doctor Who, this one really stands up. I could not have done that when I was their age. It was brilliantly realised. It is hard to write an episode of Doctor Who but they did it.”

Excitement had been building at the school last Friday morning, with BBC camera crews arriving to interview the four scriptwriters and set up equipment in the main hall.

The first surprise came when an Ood, a creature from the TV series with scraggly tentacles on his face, wandered into the hall to deliver a DVD about the competition.

After a question-and-answer session with show producer Marcus Wilson, Matt entered the room with Doctor Who head writer Steven Moffat before everyone watched the mini episode, which is entitled Death Is The Only Answer.

The trio then answered questions about monsters and fame before Matt signed autographs for children, teachers and parents, and posed for pictures. The four scriptwriters even helped out with the BBC Newsround show by interviewing the actor.

Ten-year-old Katie, of Pack Lane, Kempshott, said: “It’s been really exciting and amazing, but it has been annoying as well because our teacher said there would be no more secrets – and he kept the secret about Matt!”

Year 6 teacher Kevin Downing first told the school about the competition, typed up the script created by the four pupils, and accompanied them to Cardiff to watch the episode being filmed.

He said: “I have spent ages imagining what it would be like, but it’s 10 times better than that. Seeing all the special effects and hearing the music was amazing.”

Adam’s mother Alison Shephard also watched the episode. The 40-year-old, of Mull Close, Oakley, said: “I thought it was incredible to see it brought to life.

“Adam has been excited for so long, but they all have taken it in their stride. He gets the Doctor Who magazine every month and reads it cover to cover.”

* The special episode will be screened on BBC Three at 8pm on Saturday.