Complex sentence: Nayanars were from varied backgrounds, ranging from kings and soldiers to Dalits.
Split into simpler sentences: Nayanars were from varied backgrounds. Each of these Nayanars ranging from kings and soldiers to Dalits.