Archaeologists in Indonesia have uncovered a 1,000-year-old temple that could shed light on the country's Hindu past.

The intricately carved statues and reliefs are some of the best preserved in Indonesia, but the dig is being conducted under tight security to protect the site from well-organised relic thieves.

The temple was found on the grounds of Yogyakarta's Islamic University as workers probed the ground to lay foundations for a new library, and they realised the earth beneath their feet was not stable.

Digging soon revealed an extraordinary find: three metres underground were still-standing temple walls. Heavy rains then exposed the top of a statue of the god Ganesha in pristine condition.

A few weeks into the excavation, archaeologists are declaring the temple and its rare and beautiful statues an important discovery that could provide insights into Indonesia's pre-Islamic culture.

"This temple is a quite significant and very valuable because we have never found a temple as whole and intact as this one," said archaeologist Dr Budhy Sancoyo, who is one of the researchers painstakingly cleaning up the temple.

"For example, looking at where the statues are placed in this temple, they are in their original positions, unlike the other temples.

"This temple is important for understanding the culture of our ancestors."

A volcanic eruption is thought most likely to have covered the temple around the 10th century, about 100 years after it was built.

The eruption preserved its statues and reliefs in better condition than almost everything else discovered in Indonesia from that period, including the Borobodur and Prambanan temple complexes.

But now that they are exposed, the temple's contents need to be protected with 24-hour security.

Last November, thieves plundered the nearby Plaosan Temple.

The heads of two rare Buddhist statues were stolen, to be traded by organised syndicates dealing in artefacts.

Tri Wismabudhi from central Java's culture and heritage agency says temple thieves are robbing Indonesians of a piece of their history.

"To us, archaeological sites like this are archaeological data, so if the data is missing or incomplete, that means the history of the nation is also missing," he said.

"People don't understand that. That's why they steal, because they don't realise how important this is for us as a nation."

At the Kimpulan temple on the campus of Yogyakarta's Islamic University, the statue of Ganesha is being kept slightly buried to make it harder to steal.

It could sell for up to $250,000 on the black market.

The university wants to open the site to the public once the dig is complete.

The library that was destined for the site will be redesigned to incorporate the Hindu temple.