as a threat to the Mataram hegemony, thereby inciting further reason to march upon Batavia whilst en route to Banten. In 1628, Agung and his armies began the siege of Batavia. The initial stages of the campaign against Batavia proved difficult due to a lack of logistical support for Agung's troops. To avoid a repeat of such inadequacy, Agung established farming settlements along the northern coast of West Java. This saw support from constructed rice barns and Javanese ships filled with rice rations to support Mataram troops. Upon discovery from Dutch ships and spies however, operations of these Javanese ships and rice barns were eventually put to a stop or burned down. As a result, large numbers of Mataram troops again suffered from ill-adequate logistical support and eventually, starvation. Agung's attempt to invade Batavia ultimately ended in failure. Cracking down rebellions and eastern campaign In 1630, Mataram crushed a rebellion in Tembayat (southeast of Klaten) and in 1631–36, Mataram had to suppress rebellion of Sumedang and Ukur in West Java. Ricklefs and de Graaf argued that these rebellions in the later part of Sultan Agung's reign was mainly due to his inability to capture Batavia in 1628–29, which shattered his reputation of invincibility and inspired Mataram's vassal to rebel. This argument seems untenable due to two reason: first, rebellions against Sultan Agung already began as far back as 1617 and occurred in Pati even during his peak of invincibility after taking Surabaya in 1625. The second, and more importantly, the military failure to capture Batavia was not seen as political failure by Javanese point of view. After the failed Batavia campaign, Gresik tried to regain power in East Java and led a revolt that quickly cracked down completely in 1635. The sultan also launched a "holy war" against the still-Hindu Blambangan in the extreme eastern Java. At that time Blambangan kingdom was supported by Kingdom of Gelgel in Bali that treated it as a buffer against the Islamic expansion of Muslim Mataram. Blambangan surrendered in 1639, but quickly regained their independence and rejoined Bali soon after the Mataram troops withdrew. In 1641, Javanese envoys sent by Agung to Arabia have arrived home after obtaining permission to wear the title "Sultan" from Mecca. Mecca also sent numbers of ulama to Agung's court. His Islamic name and title gained from Mecca is "Sultan Abdul Muhammad Maulana Matarami". In 1645 Sultan Agung began