Before Roshanara Choudhry, pictured at Madame Tussauds, stabbed the Labour MP Stephen Timms in 2010, she dropped out of university and emptied her bank accounts — possible clues to the fact that she was planning an attack Rex Features

A specialist unit created by MI5 to “get inside the heads” of terrorists has helped foil seven attacks in the past year.

The Sunday Times was granted unprecedented access last week to some of the staff who work at the Behavioural Science Unit (BSU) at Thames House, the headquarters of MI5 on the north bank of the Thames.

The main task of a team of criminologists, psychologists, anthropologists and academics is to establish whether people flagged as potential threats are “talkers or walkers” — those who simply boast or those who are preparing to act.

Research by MI5 shows more than 60% of so-called lone wolves unwittingly provide clues that they are preparing to strike. The work of the BSU involves picking up signs of…