The basis of equal rights is obvious, we are all humans so we are all equal.
There is nothing obvious about it.
If, as a human, someone is more powerful, rich, educated, etc etc, than you, why should they have equal rights with you when they display very obvious, functional superior/greater qualities?
Even in terms of biology, one of the greatest threats to a mammal is its own species due to competitiveness. There is nothing about identifying one's own species that automatically defaults to spontaneous feelings of equality. Remember we are not even talking about cooperative arrangements within a clan or family (which function on the notion of inequality). The notion of equal rights flies right in the face of the material assessment of things.
Certainly, Religions are one element that divides societies, there's no question about that.
Certainly you are conveniently ignoring at least the last 300 years of religion to avoid coming to the conclusion of its unique combination. It is actually material designations that divides society (to which, religious institutions may, just like anything else in society, be susceptible to).
Religions are tribal. Muslims are still killing Muslims over their beliefs, Muslims and Christians are still killing each other over their beliefs.
Actually the middle east is traditionally very tribal, and it is this aspect that got unfortunately exported along with religious ideas in the region. Say what you will about the Romans, but at the least, they weren't tribal. As for the notion that religion causes war, you certainly couldn't say that if you were looking at religion originating in India.
The Religions that rule these folks worldview certainly doesn't consider any kind of equality or rights.
If they didn't consider it, it wouldn't have have made it anywhere near the declaration of independence... which is perhaps the most seminal treatise for discussing issues of equality in the modern world.