Scientists have found a way to "read" dreams, a study suggests.
Researchers in Japan used MRI scans to reveal the images that people were seeing as they entered into an early stage of sleep.
Writing in the journal Science, they reported that they could do this with 60% accuracy.
The team now wants to see if brain activity can be used to decipher other aspects of dreaming, such as the emotions experienced during sleep.
Professor Yukiyasu Kamitani, from the ATR Computational Neuroscience Laboratories, in Kyoto, said: "I had a strong belief that dream decoding should be possible at least for particular aspects of dreaming... I was not very surprised by the results, but excited."
People have been trying to understand dreams since ancient Egyptian times, but the researchers who have carried out this study have found a more direct way to tap into our nighttime visions.
The team used MRI scans to monitor three people as they slept.
Just as the volunteers started to fall asleep inside the scanners, they were woken up and asked to recount what they had seen.
Each image mentioned, from bronze statues to keys and ice picks, was noted, no matter how surreal.
This was repeated more than 200 times for each participant.
The researchers used the results to build a database, where they grouped together objects into similar visual categories. For example, hotel, house and building were grouped together as "structures".
The scientists then scanned the volunteers again, but this time, while they were awake and looking at images on a computer screen.
With this, they were able to see the specific patterns of brain activity that correlated with the visual imagery.
During the next round of sleep tests, by monitoring the brain scans the researchers could tell what the volunteers were seeing in their dreams. They were able to assess which broad category the images were in with 60% accuracy.
"We were able to reveal dream content from brain activity during sleep, which was consistent with the subjects' verbal reports," explained Professor Kamitani.
The researchers now want to look at deeper sleep, where the most vivid dreams are thought to occur, as well as see whether brain scans can help them to reveal the emotions, smells, colours and actions that people experience as they sleep.
Dr Mark Stokes, a cognitive neuroscientist from the University of Oxford, said it was an "exciting" piece of research that brought us closer to the concept of dream-reading machines.
"It's obviously a long way off, but there is no reason why not in principle. The difficult thing is to work out the systematic mapping between the brain activity and the phenomena," he explained.
However, he added that a single dream-reading system would not work for everyone.
"All of this would have to be done within individual subjects. So you would never be able build a general classifier that could read anybody's dreams. They will all be idiosyncratic to the individual, so the brain activity will never be general across subjects," he said.
"You would never be able to build something that could read other peoples thoughts without them knowing about it, for example."