There are several kingdoms in East Kalimantan, including the Kingdom of Kutai, Sultanate of Kutai ing Martadipura, and the Sultanate of Pasir. East Kalimantan region include Pasir, Kutai, Berau and also Karasikan (Buranun / pre-Sultanate of Sulu) claimed as conquered territory Suryanata Maharaja, the governor of Majapahit in the State Dipa (which is located in the Great Temple in Amuntai) until 1620 in the Sultanate of Banjar. Between the years 1620–1624, kingdoms in East Kalimantan turned into an area influence of the Sultanate of Sultan Alauddin Makassar, before the Bungaya agreement. According to the Hikayat Banjar, the Sultan of Makassar never borrowed land for trade covers an area east and southeast of Borneo to the Sultan Mustain Billah of Banjar when Kiai Martasura sent to Makassar and entered into an agreement with the Sultan Tallo I Mangngadaccinna Daeng I Ba'le 'Sultan Mahmud Karaeng Pattingalloang, which became Mangkubumi and principal advisor to the Sultan Muhammad Said, King of Gowa in 1638–1654 and also in-law of Sultan Hasanuddin, which will make the East Kalimantan region as a place to trade for the Sultanate of Makassar (Gowa-Tallo), since that began to arrive people from South Sulawesi. However, based on the agreement between the Sultanate of Banjar and the Dutch East India Company (VOC) in 1635, VOC help Banjar restore lands in East Kalimantan into spheres of influence of the Sultanate of Banjar. It is embodied in the Bungaya agreement, that the Sultanate of Makassar are not allowed to trade up to the east and the north Borneo