The 12-year-old Hampstead schoolgirl elbowed her assailant and kicked him in the groin, using the techniques developed by the Israeli army.

She was pounced from behind in the dark in Frognal as she walked home from a Krav Maga combat class at the JW3 Jewish community centre, where she had been training for a year.

Her teacher Sarah Brendlor, from London Krav Maga, said: “I am so proud of her. She has always worked really hard during training. She is not particularly big. She is a typical 12-year-old with a swishy ponytail and braces. She was tested to the limit as she was alone in the dark. She reacted perfectly to the horrible surprise attack, that man certainly wanted to take her when her guard was down.

“She is a very brave girl and has been taught how to turn from victim to attacker, and this training kicked in.”

After flooring her attacker, the girl then ran off and called her mother

Krav Maga, meaning contact combat in Hebrew, is a self-defence technique developed for the Israeli army and used by the Israeli secret service Mosad.

It combines techniques sourced from boxing, muay thai, judo, jujutsu and wrestling along with realistic fight training.

Ms Brendlor said: “She has been back to class since and we have all congratulated her. It is a story of triumph. All of her fellow pupils are saying ‘Krav Maga - 1, Scumbag - 0!’”

“I am so relieved she was able to react so well. It is awful to think what this attacker’s intentions were.”