An archaeologist has discovered that the passage into a burial mound on Anglesey was built to catch the rising sun on the summer solstice.
The sun streams into the chamber through the narrow entrance
Steve Burrow said he was "elated" when the sun filtered in through trees as he sat in the Bryn Celli Ddu chamber.
He made the discovery as he researched a book about burial tombs in Wales from 4,000-3,000 BC.
Carbon dating on the site has also revealed it may contain the oldest building in Wales.
Mr Burrow, the curator of Neolithic archaeology at the National Museum of Wales, said he had to visit the site twice before his discovery.
On the last day of his second visit he said he was "absolutely elated" when the sun filtered through nearby trees and entered the chamber along the five metre-long entrance passage.
"The emotion of seeing something that was put there deliberately 5,000 years ago was amazing," he said.
"I was the first person to be recording the event so I was trying to record it with stills and digital cameras as well as on a video camera, but I was jumping up and down."
The sun comes into the chamber
The site is owned by heritage body Cadw, which has part-funded a radio carbon dating programme at the site.
Testing has discovered that post holes outside the entrance to the chamber are 3,000 years older than the tomb itself.
This could point to the site having the remains of the oldest building in Wales, added Mr Burrow.
A video of the sun rising and entering the Bryn Celli Ddu chamber can be viewed as part of an exhibition called Death in Wales 3,000-4,000 BC, at the National Museum of Wales in Cardiff until 24 September.