Tuhfat al-Nafis begins with a summary taken from the Sulalatus Salatin (Malay Annals), and then tell a more detailed history of the Johor-Riau Sultanate. Tuhfat was a dynamic figure in the Bugis principality, who with military and diplomatic dexterity managed to gain an important position in the Riau states, Selangor, Sambas and Matan-Sukadana.