800 metres north of the Hindu Prambanan Temple is the Candi Sewu complex. It is the second largest Buddhist temple in Java. The name Sewu means a thousand, but in fact this complex only has 253 building structures. Candi Sewu predates the Prambanan Hindu temple complex, it was most likely originally built in the 8th Century by Rakai Panangkaran, of the Mataram Dynasty, and then expanded by Rakai Pikatan, a prince of the Sanjaya Dynasty who married a Buddhist princess from the Saliendra Dynasty. The rectangular grounds measure 185m by 165m, placed in the traditional mandala pattern around a central temple. This temple most likely used for royal ceremonies.