It is believed that the sage Vyasa scripted the Hindu epic "Mahabharata" in the state. Among the first major dynasties of Garhwal and Kumaon were the Kunindas in the 2nd century BCE who practised an early form of Shaivism and traded salt with Western Tibet. It is evident from the Ashokan edict at Kalsi in Western Garhwal that Buddhism made inroads in this region. Shamanic Hindu practices deviating from Hindu orthodoxy also persisted here. However, Garhwal and Kumaon were restored to nominal Vedic Hindu rule due to the travels of Shankaracharya and the arrival of migrants from the plains.