The hormone cortisol, released by the body in response to stressful situations such as examinations or courtroom appearances, was found to significantly impair memory retrieval.
The research, published in the journal Nature Neuroscience, tested the memory of German students after they had been given a dose of the hormone.
The students were asked to memorise 60 words shown to them for four seconds each.
Either immediately after memorising the list, or the following day, subjects were tested on various types of memory.
Cortisone tablets, which convert to cortisol once in the body, were given to half the volunteers.
Those with high levels of cortisol found it more difficult to recall words a day after memorisation.
The students did not feel particularly stressed, because cortisol is a product of stress rather than a cause.
Exam nerves
Dr Dominique de Quervain, from the University of Zurich, which carried out the research, said that examinations might be one situation in which stress levels were so high that memory was adversely affected.
He said: "Individuals have learned the material, but when the stress kicks in, they have problems remembering what they learned.
"When they leave the exam situation and relax again, the hormone levels normalise and they suddenly remember the information."
He said that memory was impaired for only a few hours after the release of the stress hormone.
The researchers added that the stress of giving evidence in court might also adversely affect the recall of important evidence.
The findings reinforce those of a similar US study last year which suggested that cortisol interfered with the ability to memorise.