Srivijaya was a Mahayana Buddhist empire which existed for 700 years. Its capital was in Palembang, Sumatra. Ships from Arabia, Persia, and India, sailing into Southeast Asia to buy spices and rainforest produce, had to sail through the Srivijayan-controlled seas. Srivijaya kept its waters safe from pirates and soon, the kingdom became a wealthy maritime empire, ruling over all the coastal ports, towns, and villages on the Malay peninsula and Sumatra. Although it overlorded all the surrounding kingdoms, it too was overlorded by China. Srivijayan princes presented gifts of dwarfs, musicians, and multi-colored parrots to the Emperor of China who in return bestowed the King of Srivijaya with titles of honor.[2] Srivijayan kings bore the title "Sri Maharaja".