I will just ask you one question.
Which came first, ethics morality and values or religion?
That would be the other question to "which came first, the egg or the steak?"
anyways... moving on
in my opinion .. that would be religion !
Rather than a religion as per se'.. I would say the belief of a higher power than the human. Either higher or darker... I believe people started believing in a power other than what they could capture to their visual spectrum.
If you scrutinize the basic fundamentals of any religion., you will see that it's almost always based around "the perfect" being.
The all powerful, the mighty, the know all and best of all higher Human power than all the mortals strive to achieve ! isn't it?
it's the basic craving of any human the need to be better than him self or others in comparison....which gave the power and start to a stream called religion.
Through a religion, people dictates on "how" we should live.. "how" we should behave and "how" we should conduct our selves within a community.
So I would say ethics morality and values are all by products of religion !