The Kraton Ngayogyakarta Hadiningrat or Sultan Palace is a palace complex in the city of Yogyakarta, Yogyakarta Special Region, Indonesia. It is the seat of the reigning Sultan of Yogyakarta and his family. The complex is a center of Javanese culture, and contains a museum displaying royal artifacts. It is guarded by the Yogyakarta Kraton Guards (Indonesian: Prajurit Keraton Ngayogyakarta Hadiningrat).
The complex was built in 1755–1756 (AJ 1682) for Hamengkubuwono I, the first Sultan of Yogyakarta. It was one of the monarch’s first acts after the signing of the Treaty of Giyanti, which recognized the creation of the Sultanate of Yogyakarta under the Dutch East India Company. A banyan forest, protected from flooding by its location between two rivers, was chosen as the site for the palace.
On 20 June 1812, Stamford Raffles led a 1,200-strong British force to attack the walled royal city of Yogyakarta. Although they outnumbered the British, the Javanese were unprepared for the attack. Yogyakarta fell in one day, and the palace was sacked and burned. A total of £15,000 in gold, jewels and currency (currently valued at £500,000) was looted. It was the first attack on a Javanese court, and the sultanate was subjugated to colonial authority. Most of the current palace was built by Sultan Hamengkubuwono VIII (who reigned from 1921 to 1939), and was rebuilt after earthquakes in 1876 and 2006.