The first Jews arrived in the regions of Bosnia and Herzegovina in the middle of 15th century from Spain and Portugal. As tens of thousands of Jews fled the Spanish and Portuguese Inquisitions, Sultan Bayezid II of the Ottoman Empire welcomed Jews who were able to reach his territories. Sephardi Jews fleeing Spain and Portugal were welcomed in – and found their way to Bosnia and Herzegovina, Macedonia, Thrace and other areas of Europe under Ottoman control. Sarajevo became center for Jews.Jews in Ottoman Empire were generally well-treated and were recognized under the law as non-Muslims. Despite some restrictions, the Jewish communities of the Empire prospered. They were granted significant autonomy, with various rights including the right to buy real estate, to build Synagogues and to conduct trade throughout the Ottoman Empire. Jews, along with the other non-Muslim subjects of the Empire, were granted full equality under Ottoman law by 1856.