The Mataram kingdom was another mater. As the power of the Dutch grew, the empire began to disintegrate, and by the 18th century infighting was taking its toll. The first two Javanese War of Succession were fought but fortunately resolved by the treaty of 1743; the ruler Pakubuwono II was restored to his battered court, but the price of concessions to the colonial power was high.
Obviously needing a fresh start, Pakubuwono II abandoned his old capital at Kartosuro and established a new court at Solo (Surakarta). However, rivalry within the court soon reared its ugly head again, resulting in the Third Javanese War of Succession in 1746. The Dutch rapidly lost patience and split the kingdom in three, creating the royal houses of Solo and Yogyakarta, and the smaller domainof Mangkunegaran within Solo.

Into this turbulent picture stepped one of the most famous figures of Indonesia history, Prince Pangeran Diponegoro, who subsequently launched the anti Dutch Java war og 1825 - 1830. At the end of this guerrilla war, the Dutch held sway over all the royal courts, which soon became ritual establishments with Dutch residen (head of a residency during colonial administration) exercising control. With no real room
or will for political monoeuvre, the courts turned their energies to traditional court ceremonies and artistic patronage, thus creating the rich cultural cities we see today.