Gianti Agreement, (1755), in Indonesia, treaty between two members of the Mataram royal family as a result of a succession war in 1749–57. Pakubuwono II, king of Mataram, had backed a Chinese rebellion against the Dutch. In 1743, in payment for his restoration to power, the King ceded the north coast of Java and Madura to the Dutch East India Company. Later, before his death in 1749, he ceded the remainder of the kingdom. Mataram then became a vassal state of the company.
Pakubuwono III, who was supported by the company, became the new king, but he had to face a rival of his father, Raden Mas Said, who had occupied a region called Sukowati. In 1749 Mangkubumi, the brother of the late Pakubuwono II, dissatisfied with his inferior position, joined Raden Mas Said in the struggle against Pakubuwono III. The company sent troops to assist its vassal king, but the rebellion continued. Not until 1755 did Mangkubumi break away from Raden Mas Said and accept a peace offer at Gianti, by which Mataram was divided into two parts. Eastern Mataram was headed by Pakubuwono III, with Surakarta as its capital, while western Mataram was ruled by Mangkubumi, later known as Sultan Amangku Buwono I, who built his palace in Jogjakarta. Raden Mas Said signed a treaty with the company in 1757, which entitled him to have a part of eastern Mataram. He was thenceforth known as Mangkunegara I.