Emperor Naruhito visited Borobudur temple, a UNESCO World Heritage-listed site in central Java, on Thursday, the sixth day of his official goodwill visit to Indonesia.

The emperor, clad in a traditional batik-dyed shirt, climbed the stairs of the pyramid-shaped Buddhist temple in the suburb of Yogyakarta, an ancient city on Java Island.

The emperor said he was very happy to travel to Borobudur and that he had long wished to visit.

"I hope this remarkable temple will be preserved for a long time to come," he told reporters.

The temple was constructed in the eighth and ninth centuries and is renowned for the fine reliefs adorning its walls and 72 stupas, each containing a Buddha statue.

The emperor, who wore sandals so as not to damage the cultural property, took photos of the temple as he walked.

He will travel to Jakarta later Thursday. The emperor and Empress Masako, who accompanied him on the Indonesia trip but did not go to Yogyakarta or the temple, are scheduled to return to Japan on Friday.

The imperial couple met Indonesian President Joko Widodo on Monday in Bogor, south of Jakarta. They received an invitation to visit from the president in July last year.