You have just been arrested for robbing a shop with a shotgun and dragged to the local police station. A sergeant takes a cloth helmet bristling with electrodes and pulls it over your head. Pictures of the crime scene are flashed before you on a computer screen: an image of the shopkeeper victim; a picture of a man standing in the store; a photo of the gun used in the hold-up.

You remain silent - but to no avail, for your brain has already revealed your complicity by emitting tiny electrical signals as each image matches your own memories of the robbery that you recently committed.

It sounds fantastic. Nevertheless, such scenes have already been played out in lawyers' offices and police stations in America as the fledgling technique of brain fingerprinting has been introduced to solve crimes. Success suggests that in the near future criminals may betray their guilt - not through physical evidence but through their own unconscious thoughts.

'People remember the major events in their life, even a serial killer,' said Lawrence Farwell, the inventor of brain fingerprinting. 'That tends to have a solid record in the brain.'

Unlike discredited lie-detecting techniques, which measure changes in breathing, heart rate and other variables to determine if suspects are trying to deceive their interrogators, brain fingerprinting is designed to discover if specific information is stored in a person's brain. The technique exploits the fact that the brain emits an electrical signal known as a P300 exactly 300 milliseconds after it is confronted with a stimulus that has special significance to that individual - for example, a victim's face.

'The fundamental difference between the perpetrator of a crime and an innocent person is that the former has the details of it stored in his brain,' added Farwell. 'The innocent suspect does not.'

Thus a robber will inadvertently emit a P300 signal - which can be picked up using electrodes fitted to his skull - when shown an image of his victim or the gun he used to rob him. An innocent person who has never met the victim or used a gun will not emit such signal.

Farwell told The Observer he had already used the technique with total success in mock crimes created using FBI agents in order to reveal those who possessed knowledge hidden from others. He believes the technique could have vital criminal and security uses. A terrorist attempting to hijack and crash a jumbo jet would reveal his intent through his reactions to photographs of aircraft cockpits, for example.

Farwell - who has received substantial US government backing - has now set up his own company, Brain Fingerprinting Laboratories, to market the technique, though his technology is not without critics.

Prof Peter Rosenfeld, of Northwestern University in Evanston, Illinois, believes that not enough attention has been paid to factors that could distort the outcomes of brain fingerprint profiles. Memories change over time, as he points out. And it could be discovered that psychopaths have very different responses than others. 'It will take a substantial amount of research before this is ready,' Rosenfeld told the journal Nature.

Nevertheless, brain fingerprinting has already claimed several legal successes, including the case of Terry Harrington who was given a life sentence after being convicted of a night watchman's murder in Iowa in 1978. Farwell showed Harrington's electronic brain patterns were not consistent with someone who had been present at the crime scene. The evidence was rated as admissible at a post-conviction hearing and played a key role in having Harrington freed late last year.

But now brain fingerprinting faces its most controversial case. A few weeks ago, Farwell used his technique to show that Jimmy Ray Slaughter - convicted and sentenced to death for the murder of his daughter Jessica and his partner Melody - lacked any knowledge of key details about the crime scene, including the positions of the victims' bodies. Nevertheless, prosecutors last month asked the Oklahoma Court of Criminal Appeals to set an execution date for Slaughter. Brain fingerprinting is now expected to play a key role in attempts to block his execution.