The Prophet Muhammad had been invited to Medina to quell tensions in the city. With a few months of arriving, he created a social contract between the different tribes in they city, specifying the behaviors expected from each group: Ansar, Muhajireen, Jews, and Polythiests