By 1522, the Portuguese were ready to form a coalition with the Sunda King in order to get access to his profiting pepper trade. That was the same year that Magellan's global circumnavigation was completed.
The commander of the fortress of Malacca at that time was still Jorge de Albuquerque. In 1522, he sent a ship, the São Sebastião, under Captain Henrique Leme, to Sunda Kalapa with valuable gifts for the king of Sunda. Two written sources describe the concluding of the treaty in detail. One is the original Portuguese document of 1522 with the text of the treaty and the signatories of the witnesses, and the other is a report on that event by João de Barros in his book Da Ásia, printed not before 1777/78.
According to these sources, the king welcomed them warmly upon their arrival. The Crown Prince (1512 and 1521) had succeeded his father and was now King Prabu Surawisesa with his title Ratu Samiam (Sang Hyang). Barros called him King Samião. This Sunda ruler agreed to an arrangement of friendship with the King of Portugal and decided to grant a fortress at the mouth of the Ciliwung river where the Portuguese could load as many ships as they wished with pepper. In addition, he pledged that from the day when the building of the fortress began, each year he would donate one thousand sacks of pepper to the Portuguese King (that is more than 20 tons). The contract document was drawn up twice, one copy for the King of Sunda and one for the King of Portugal; they were signed on August 21, 1522. The king's deputies were the main mandarin Padam Tumangu, and the mandarin Sangydepaty and Benegar, as well as the xabandar of the land named Fabian.
'On the said day' the said mandarins and other honorable men, together with Henrique Leme and his entourage, went to the very place where the fortress should be constructed at the mouth of the river on the "land called Sunda Kalapa". There they erected a memory stone, called a padrão, in current Tugu sub-district, North Jakarta. It was a custom of the Portuguese to set out a padrão when they discovered a new land. The National Museum of Jakarta now hosts that padrão.
The Portuguese failed to keep their promise to come back the next year to construct the fortress because of troubles in Goa/India. They did not return to the Java Sea, with six ships from Bintan under the command of Francisco da Sá, until November 1526.