According to Sri Lankan legends, when the Buddha died, his body was cremated in a sandalwood pyre at Kusinara in India and his left canine tooth was retrieved from the funeral pyre by Arahat Khema. Khema then gave it to King Brahmadatte for veneration. It became a royal possession in Brahmadatte's country and was kept in the city of Dantapuri (present day Puri in Orissa).
A belief grew that whoever possessed the Sacred Tooth Relic had a divine right to rule that land. Wars were fought to take possession of the relic. 800 years after the Buddha's death, in the 4th century CE, the tooth came into the possession of King Guhaseeva of Kalinga, which roughly corresponds to the present day state of Orissa.
Kalinga had become a Buddhist and begun to worship the Sacred Tooth relic. This caused discontent among some of the citizens, who went to King Paandu and said that King Guhaseeva had stopped believing in god and that he had started to worship a tooth.
King Paandu decided to destroy the relic, and ordered to it brought to the city. It is said that, as the tooth arrived at the city, a miracle occurred, and King Paandu converted to Buddhism. When King Ksheeradara heard, he went with his army to attack Paandu in the city of Palalus. The invaders were defeated before reaching the city, and King Ksheeradara died.
A prince from the city of Udeni who had become a Buddhist came to worship the sacred tooth. King Guhaseeva was pleased with him, and let him marry his daughter. The prince was known as Dantha and the princess as Hemamala.
When they heard that King Ksheeradara had died in the war, his sons raised a large army to attack King Guhaseeva and destroy the relic. They entered the city, but King Guhasiva secretly sent Dantha and Hemamala out of the city, with the relic.
According to legend, Hemamali hid the relic in her hair ornament and the royal couple disguised themselves as Brahmins in order to avoid discovery. They set sail from Tamralipti, a port at the mouth of the river Ganges, and landed in Sri Lanka at the port of Lankapattana (now Ilankeiturei).
It is said that Sri Lanka was chosen as the new home for the tooth relic because the Lord Buddha had declared that his religion would be safe in Sri Lanka for 2,500 years.
At the time of Dantha's and Hemamali's arrival on the island, King Kirti Sri Megavanna or Kithsirimevan ruled Sri Lanka. The King was overjoyed when he heard the news and warmly welcomed the royal couple and received the Sacred Tooth Relic with great veneration. He built a beautiful palace within the Royal Palace Complex itself and enshrined the Relic in it. Thereafter, he ordered that an annual perahera be held in honour of the Sacred Relic.
As time went on, as the land was threatened with foreign invasions, the seat of the kingdom was moved from Anuradhapura to Polonnaruwa, then to Dambadeniya and other cities. Upon each change of capital, a new palace was built to enshrine the Relic. Finally, it was brought to Kandy where it is at present, in the Sri Dalada Maligawa temple.
The Sacred Tooth Relic came to be regarded as a symbolic representation of the living Buddha and it is on this basis that there grew up a series of offerings, rituals, and ceremonies. These are conducted under the supervision of the two Mahanayake Theros of Malwatte, Asgiriya Chapters, and Diyawadana Nilame of the Maligawa. These have a hierarchy of officials and temple functionaries to perform the services and rituals.