Security service MI5 is taking on an unlikely ally by teaming up with long-running children's show Blue Peter - on a mission to find viewers with the skills to be spies.

The BBC programme is launching Project Petra which will enable a number of candidates to be put through their paces in a rigorous selection procedure with mental and physical challenges.

Three will be chosen and allowed to tour MI5's HQ in London, Thames House, and their visit will be filmed by the CBBC show - the first time TV cameras have been allowed in to the top secret building.

Bestselling author Anthony Horowitz, who has written the Alex Rider series of books about a teenage agent, is on the selection panel to find CBBC Intelligence Officers.

Viewers of the CBBC programme, aged between eight and 14, will apply through the Blue Peter website and eight will be chosen to attend a "spy school" weekend where their observational and analytical skills will be tested, as well as their physical abilities.

Three will eventually be chosen to head in to the secret base.

Horowitz - also the writer of ITV's soon-to-end series Foyle's War about the secret service - said "Children are fascinated by the world of spies and secret intelligence and so, for that matter, am I. I'm really thrilled to have been invited to join this top secret panel, it's going to be a real adventure."

The contest, named after one of the show's early pets, will be launched on tonight's edition of Blue Peter with application forms on the website at www.bbc.co.uk/cbbc/shows/blue-peter.

Programme editor Ewan Vinnicombe said: "Project Petra is one of the most exciting opportunities Blue Peter has ever given its audience.

"We're always looking for new ways to help kids understand the world around them and join in with our content and this is a brilliant example of how we can do this on the show, both for the kids taking part and the audience watching on TV and online."

CBBC controller Cheryl Taylor said: "We're aware that children are fascinated by the mysterious world of intelligence and we're thrilled to be in a position to feed their passion for intrigue and adventure with this unique proposition.

"With MI5 and Anthony Horowitz on board we know they will be awestruck by the expert credentials of our partners in this once in a lifetime CBBC opportunity."