A sampy is an amulet or idol of spiritual and political importance among numerous ethnic groups in Madagascar. Amulets and idols fashioned from assorted natural materials have occupied an important place among many Malagasy communities for centuries. Ody, personal amulets believed to protect or allocate powers to the wearer, were commonplace objects possessed by anyone from slave children to kings. The name sampy was given to those amulets that, while physically indistinguishable from ody, were distinct in that their powers extended over an entire community. The sampy were often personified - complete with a distinct personality - and offered their own house with keepers dedicated to their service.
In the sixteenth century, King Ralambo of the Merina people amassed twelve of the most reputed and powerful sampy from neighboring communities. He furthermore transformed the nature of the relationship between sampy and ruler: whereas previously the sampy had been seen as tools at the disposal of community leaders, under Ralambo they became divine protectors of the leader's sovereignty and the integrity of the state which would be preserved through their power on the condition that the line of sovereigns ensured the sampy were shown the respect due to them. By collecting the twelve greatest sampy (twelve being a sacred number in Merina cosmology) and transforming their nature, Ralambo strengthened the supernatural power and legitimacy of the royal line of Imerina.
The Tantara ny Andriana eto Madagasikara offers an account of the idols' introduction into Imerina. According to legend, one day during Ralambo's reign a woman named Kalobe arrived in Imerina carrying a small object wrapped in banana leaves and grass. She had traveled from her village located at Isondra in Betsileo country to the south which had been destroyed by fire, walking the great distance and traveling only at night in order to deliver to the king what she called kelimalaza ("the little famous one"), giving the impression that it was no less than the greatest treasure in the land. Ralambo took the sampy and built a house for it in a nearby village. He then selected a group of adepts who were to study under Kalobe to learn the mysteries of the kelimalaza. Oral history maintains that Kalobe was "made to disappear" after the adepts' training was completed in order to prevent her from absconding with the precious idol.