A study of ecstasy users in the United States found that they suffered significant memory loss several weeks after they stopped taking the drug.
"Our study shows ecstasy can be associated with memory damage," said Karen Bolla, associate professor of neurology at Johns Hopkins Bayview Medical Centre in Baltimore.
"The main message is that heavy use of ecstasy can affect memory and these effects can persist after it has left the body," Dr Bolla said.
The scientists compared 24 ecstasy users with a group of youngsters who had never taken the drug and found that the users suffered a significantly impaired ability to recall what they had seen or heard.
Those who took part had to be drug free for at least two weeks before being tested to ensure that withdrawal symptoms did not affect the results, which are to be published in the journal Neurology.
George Ricaurte, another member of the Johns Hopkins team, said all types of memory were affected. "Tests show that heavy ecstasy users have damage to their visual and verbal memory," he said.
Visual memory allows a person to recall objects they had seen earlier and verbal memory is the ability to remember information read aloud.
"Men were affected more than women, which may be due to differences in the way the brain works in the two sexes or because of hormonal influences, such as oestrogen having a protective influence," Professor Bolla said.
The study linked heavy ecstasy use with a fall in serotonin levels, a crucial chemical messenger in the brain. Professor Bolla said they defined heavy users as those who took more than one ecstasy pill a week.
An analysis of the cerebral spinal fluid of users showed that ecstasy can damage the nerve cells in the brain that produce serotonin, which regulates memory as well as mood, appetite perception, pain, sexual activity and sleep, Professor Bolla said.
Ecstasy, the common name for the chemical MDMA, is structurally similar to mescaline, a natural hallucinogenic drug, and amphetamine, which acts as a stimulant.
People who take ecstasy say they experience euphoria and happiness but the drug is also associated with feelings of lethargy and depression. It has been linked with a number of deaths in otherwise healthy young people.
A recent survey found that 13 per cent of university students had taken ecstasy, which first became popular on the clubbing scene in 1989.
Professor Andy Parrott, head of psychology at the University of East London, told a conference in London earlier this month that the more the drug is studied, the more problems are uncovered.
"The strands of evidence we can pull together suggest that MDMA may indeed be neurotoxic for humans. What we don't yet know is how long-term those problem are," he said.Reuse content