Berune
Brunei rose on the river and bay at the northern gateway of Borneo, where the ruler's palace and a few stone-walled quarters stood on dry ground while most houses were built over salt water. The Chinese knew the kingdom as Boni, whose ruler sent a letter to the emperor in 977; in 1365 the Javanese poem #italic Nagarakretagama#! listed Barune among the lands that owed Majapahit tribute of camphor. Sulu raiders sacked the capital in 1369, and a Majapahit fleet drove them out.
In the fifteenth century the court at Kota Batu turned Muslim and broke free of Java, and Sharif Ali, an Arab from Mecca, became its third sultan. Under Sultan Bolkiah, who reigned from 1485, Bruneian power reached along the Borneo coast and into the Sulu islands and the Manila area. Antonio Pigafetta of the Magellan expedition saw the city in 1521 and found a great town of timber houses on stilts, its ruler protected by a stone wall with towers. After Melaka fell to the Portuguese, Muslim merchants came to Brunei instead. In April 1578 Spanish forces from Manila seized the capital, but disease forced them out within weeks.