Under this threat, Prabu Surawisesa Jayaperkosa, who reigned over the kingdom from 1521 to 1535, concluded the treaty with Portuguese from Malacca to establish a warehouse and fortress at Sunda Kalapa in return for protection against the expansive forces.