The Maldives has celebrated 900 Hijri years since its conversion to Islam, marking nearly nine centuries of a faith that has become inseparable from the identity of the Indian Ocean island nation.
President Mohamed Muizzu led official commemorations on Sunday, with sermons, religious lessons and cultural events held across the country to remember the conversion traditionally dated to 548 AH, or 1153 CE.
The anniversary also saw the laying of the foundation stone for the Sultan Muhammad ibn Abdullah Grand Mosque and Centre for Islamic Civilisation in Hulhumale, named after the ruler credited with beginning the country's Islamic era.
But how did a predominantly Buddhist island kingdom south-west of India become one of the world's most thoroughly Islamic societies?
A Buddhist kingdom on Muslim trade routes
The Maldives was inhabited long before the arrival of Islam, with early settlers arriving principally from the Indian subcontinent and Sri Lanka.
Buddhism became the dominant religion and remained deeply embedded in the islands for centuries, as demonstrated by archaeological remains of monasteries, stupas and other Buddhist structures.
But the Maldives also occupied an important position within the vast maritime trading system of the Indian Ocean.
Arab and Persian Muslim merchants increasingly travelled the routes connecting the Gulf and Arabian Peninsula with East Africa, India and Southeast Asia.
The islands were particularly famous for cowrie shells, which were exported in enormous quantities and used as currency across parts of Asia and Africa. Dried tuna, coconuts and coir made from coconut fibre were also important commodities.
Muslim contact with the Maldives therefore preceded the country's formal conversion.
The king who became Sultan Muhammad
Maldivian tradition dates the decisive change to 1153, when King Dhovemi converted from Buddhism to Islam and adopted the Muslim name and title Sultan Muhammad ibn Abdullah.
His conversion is traditionally attributed to a visiting Muslim scholar and preacher named Abu al-Barakat Yusuf al-Barbari.
Exactly who Abu al-Barakat was remains disputed.
The description "al-Barbari" has traditionally led to claims that he was a Berber from North Africa, likely Morocco, while Somali tradition has also claimed him. Another historical tradition identifies the missionary with Yusuf Shams al-Din al-Tabrizi, suggesting a Persian origin.
Whatever his precise identity, the conversion attributed to him became the foundational story of Maldivian Islam.
Following Dhovemi's conversion, Islam spread throughout the islands and the Buddhist monarchy was transformed into a Muslim sultanate. Muslim dynasties would rule the Maldives, with interruptions and changes of dynasty, for centuries.
The legend of Rannamaari
The conversion also acquired a famous supernatural tradition.
When Moroccan traveller Ibn Battuta visited the Maldives in the 14th century, he recorded a local story that islanders had once lived in fear of a sea demon known as Rannamaari.
According to the story, a young woman was periodically offered to the creature until a visiting Muslim confronted it by spending the night reciting the Qur'an.
The demon failed to return, and the king, impressed by what had happened, embraced Islam.
The story cannot be treated as a literal historical account of the conversion, but Ibn Battuta's recording of it is significant: it shows that a story connecting the country's Islamisation with a foreign Muslim was already established in Maldivian memory around two centuries after the event.
Ibn Battuta himself spent months in the Maldives and served as a qadi, or Islamic judge, providing one of the most important medieval descriptions of Maldivian Muslim society.
Islam and Maldivian identity
Over the following centuries, Islam became deeply interwoven with Maldivian culture, government and architecture.
Among the most distinctive surviving examples are the islands' historic mosques constructed from carved coral stone, an architectural tradition unique to the country's maritime environment.
The modern Maldives remains overwhelmingly Muslim, and Islam occupies a formal place in the country's national and constitutional identity.
This year's commemorations deliberately connect that contemporary identity with the conversion of Dhovemi nine Islamic centuries ago.