jogja ... During the reign of Pakubuwono II, a civil war broke out in Mataram Sultanate. The civil war was Fought between Prince Mangkubumi and his elder brother, Sunan Pakubuwono II. The civil war started when Sunan Pakubuwono II agreed to cooperate with the VOCs, some of Mataram ceded territory to the Dutch, and submitted to foreign powers. His younger brother, Prince Mangkubumi Stood against the agreement due to concern that his people would Become slaves under Dutch rule. Prince Mangkubumi Defeated the Pakubuwono forces and declared sovereignty in the Kingdom of Yogyakarta occupying southern parts of the former Sultanate of Mataram.
The Yogyakarta Sultanate was established as a result of the Treaty of Giyanti (Gianti Agreement) by Prince Mangkubumi, who later ascended the throne as Sultan Hamengkubuwono I. Officially, the creation of Yogyakarta Sultanate is dated at 7 October 1756 as a result of civil war Among the princes of the Sultanate of Mataram. This civil war marked the end of the Mataram Sultanate and resulted in the birth of the Yogyakarta Sultanate and the Surakarta Sunanate.
However, in later years both of the Heir of Mataram, the Yogyakarta Sultanate and the Surakarta Sunanate confined Reviews their power and were reduced as Dutch East Indies Protectorate Kingdoms under the crown of the Kingdom of the Netherlands, identified as Vorstenlanden Mataram.
During the British occupation of Java, rumors of Javanese court's plan on staggering a rebellion cause uneasiness to the colonial authority. On 20 June 1812, Stamford Raffles led a 1,200-strong British force to attack the royal city. The Javanese who are surprised by the attack was Easily subdued. In one day the city of Yogyakarta fell with the city destroyed and its palace looted. The event completely stripped the Sultanate of its remaining power and influence.  The sack Also left the court humiliated and fueled a rebellion the which would be known as the Java War.