A James Bond fan who blazed a joint at the premiere of the new 007 film was told by a magistrate to go home to his mum and “be a good boy”.

Thomas Palmer, 27, tussled with police after being asked to leave the space outside the Royal Albert Hall for smoking cannabis.

Palmer, of Hare Walk, Hoxton, is “spy fixated” and became excited about the film’s release on Monday, Westminster Magistrates’ Court heard on Wednesday.

It was the first night of Spectre, attended by star Daniel Craig and the Duke and Duchess of Cambridge.

Palmer was approached by security staff after they detected cannabis aroma near the red carpet. They were forced to call police when he refused to leave.

Caroline Mungal, prosecuting, said: “He fell to the floor to obstruct police officers. When he was searched he was found to have a snap bag of cannabis in his bag and one in his sock.”

After spending two nights in custody, Palmer admitted obstructing an officer and one charge of cannabis possession.

Beverly Tomlinson, defending Palmer, said: “He was at the premiere because he has a fixation with spies and felt he was a spy on that day as well.

“He got a bit over excited and wanted to protest when officers wanted to search him.

“Should he be released from court today he will return to his mother’s address in Wiltshire and he will cooperate with the community mental health team.”

Palmer was spared a £350 fine when the bench deemed the amount served, due to the two days he spent in prison.

Chairwoman of the bench Lillian Ibbett said: “Go home to your mother, be a good boy. Stay out of trouble.”

He replied “what, really?” and repeatedly thanked the magistrates.