The Constitution of Medina (622 AD; Arabia) instituted a number of rights and responsibilities for the Muslim, Jewish and pagan communities of Medina, establishing religious freedoms, the security of women, a system for granting protection of individuals, and a judicial system.