Jewish-Spanish scholars fleeing from the Castile in 1391 and again in 1492 was mainly carried out in Algeria and Morocco, and the Tunisian Jews, abandoned by this phenomenon, were led to consult Algerian scholars such as Simeon ben Zemah Duran. In the 14th and 15th centuries, the Jews of Tunis were treated more cruelly than those elsewhere in the Maghreb. While refugees from Spain and Portugal flocked to Algeria and Morocco, only some chose to settle in Tunis. The Tunisian Jews had no eminent rabbis or scholars and had to consult those of Algeria or Morocco on religious questions. In the fifteenth century, each community was autonomous – recognized by power from the moment it counts at least ten major men – and has its own institutions; Their communal affairs were directed by a chief (zaken ha-yehudim) nominated by the government, and assisted by a council of notables (gdolei ha-qahal) made up of the most educated and wealthy family heads. The chief's functions consisted in the administration of justice among the Jews and collection of Jewish taxes. Three kinds of taxes were imposed on Tunisian Jews: a communal tax, to which every member contributed according to his means; a personal or capitation tax (the jizya); a general tax, which was levied upon the Muslims also. In addition to these, every Jewish tradesman and industrialist had to pay an annual tax to the guild. After the 13th century, taxes were collected by a qaid, who also served as an intermediary between the government and the Jews. His authority within the Jewish community was supreme. The members of the council of elders, as well as the rabbis, were nominated at his recommendation, and no rabbinical decision was valid unless approved by him. During the conquest of Tunis by the Spaniards in 1535, many Jews were made prisoners and sold as slaves in several Christian countries. After the victory of the Ottomans over the Spaniards in 1574, Tunisia became a province of the Ottoman Empire led by deys, from 1591, then by beys, from 1640. In this context, Jews arriving from Italy have played an important role in the life of the country and in the history of Tunisian Judaism. During the Spanish occupation of the Tunisian coasts (1535–74) the Jewish communities of Bizerte, Susa, Sfax, and other seaports suffered greatly at the hands of the conquerors; while under the subsequent Turkish rule