There were originally three settlements of the Jews in Madina namely those of Banu Qainuqa, Banu Nadir, ant Banu Quraizah. Every settlement was a stronghold, The Holy Prophet gave them a charter of freedom, whereunder they enjoyed autonomy in the administration of their affairs. The Jews entered into agreements of alliance with the Muslim community and undertook to help the Muslims in the event of any attack on Madina. The Jews, however, did not honor such agreements, and the Muslims had to take punitive action against them. After Battle of Badr, action had to be taken against the Banu Qainuqa. They were expelled from Madina and they migrated to Syria. After the Battle of Uhud, action had to be taken against Banu Nadir. They were expelled from Madina and they migrated to Khyber.