The legend reports that King Sam Fang Kaen of Lan Na wanted it in his capital of Chiang Mai, but the elephant carrying it insisted on three separate occasions on going instead to Lampang. This was taken as a divine sign, and the Emerald Buddha stayed in Lampang in a specially-built temple (now Wat Phra Kaeo Don Tao) for the next 32 years. In 1468, it was moved to Chiang Mai by King Tilokaraj, where it was kept in a niche in a large stupa called Chedi Luang.