"O HUMANITY! Indeed, We created you from a male and a female, and made you into peoples and tribes so that you may get to know one another. Surely the most noble of you in the sight of Allah is the most righteous among you. Allah is truly All-Knowing, All-Aware." - Surah Al Hujurat, verse 13.
When the Prophet Muhammad migrated to Medina, he created a constitution called the Saheefah. This was a reflection of his role as not only a religious leader but also as the leader of a state that had citizens of all religions. Within this constitution, he explicitly stated the roles and responsibilities of each citizen, including protecting and respecting each other's rights despite differences in race, religion and tribal alliances.