By the late 16th century, European traders began to frequent central Javanese ports. The Dutch established a presence in the region through their East India Company. Following the collapse of Demak, Mataram under the reign of Sultan Agung was able to conquer almost all of Java and beyond by the 17th century, but internal disputes and Dutch intrigues forced it to cede more land to the Dutch. These cessions finally led to several partitions of Mataram. The first was after the 1755 Treaty of Giyanti, which divided the kingdom in two, the Sultanates of Surakarta and Yogyakarta. In a few years, the former was divided again with the establishment of the Mangkunegaran following the 1757 Treaty of Salatiga.