Hinduism is divided into four classes: the ruling class (or Kshatriyas), the priest class (Brahmins), the business class (or Vaishyas) and the lower class (or Shudras). Towards the end of later Vedic Age (1000 BC-600 BC), the social stratification was at its peak and the country was divided into a number of states and small kingdoms.
The Kshatriyas were the rulers of these states, while the Brahmins were the religious leaders and were needed to sanctify the rule of kshatriyas and carry out the religious duties for the society. The lower class was oppressed by both these upper classes and was disgruntled. The two upper classes were fighting among themselves, with each fighting for the control of the State. It is in this age of turmoil that Jainism and Buddhism arose to counter the threat of the rise of Brahmins. The founders of Jainism (Mahavira) and Buddhism (Buddha, born as Siddharth) were both from ruling families and were princes themselves. These religions preached non-violence and a path to god that was open for all (unlike Hinduism where Shudras were not allowed access to temples). The religions got the support of not only the ruling class, but the lower class as well and hence became very popular in India and East Asia.