The Nayanars and Alvars led religious movements in south India during the seventh to ninth centuries. The Nayanars were devotees of Shiva while the Alvars were the devotees of Vishnu. They came from all castes including those considered 'untouchable like the Pulaiyar and the Panars. They preached the love of Shiva or Vishnu as the path to salvation. They went from place to place composing beautiful poems in praise of the deities enshrined in the villages they visited and set them to music. There were 63 Nayanars who belonged to different caste backgrounds. There were 12 Alvars who came from equally divergent backgrounds.