Mahavira was neither just a philosopher nor just a religious figure. He balanced the two.
He realized the truth and then for the development of the consciousness observed restraint over that which ought not to be practised and practised that which ought to be.
Mahavira said:
Only knowledge, only devotion or only effort cannot take a man towards liberation from sorrow. A balanced combination of knowledge, philosophy and conduct alone leads man towards liberation from sorrows. On the basis of this philosophy he established the following principle (sutra):
Know first and then do.
Effort devoid of knowledge and knowledge devoid of effort are both of no avail. To apply knowledge in practice and to practise that which is learnt, their co-existence brings success.