The history of the Jews in Portugal reaches back over two thousand years and is directly related to Sephardi history, a Jewish ethnic division that represents communities that originated in the Iberian Peninsula (Portugal and Spain). Jewish populations have existed in the area long before the country was established, back to the Roman era (province of Lusitania), but an attested Jewish presence in Portuguese territory can be documented only since 482 CE. With the fall of the Roman Empire, Jews were persecuted by the Visigoths and other European Christian kingdoms that controlled the area after that period. In 711, the Moorish invasion of the Iberian Peninsula was seen by many in the Jewish population as a liberation, and marked as the beginning of what many have seen as a golden age (the Islamic Al-Andalus) even if the Jews, as well as the Christians (the Mozarabs of the Visigothic rite), under Muslim rule were considered dhimmi and so they had to pay a special tax. Rapidly in the 8th century, the Christian kingdoms of the north mountainous areas of the Iberian Peninsula (Kingdom of Asturias) started a long military campaign against the Muslim invaders, the Reconquista. The Jews, since many of them knew Arabic, were used by the Christians as both spies and diplomats on the campaign, which took centuries. That granted them some respect although there was always prejudice. King Afonso I of Portugal entrusted Yahia Ben Yahi III with the post of supervisor of tax collection and nominated him the first Chief-Rabbi of Portugal (a position always appointed by the King of Portugal). Jewish communities had been established prior to these years, an example of Jewish expansion can be seen in the town of Leiria founded by King Afonso I in 1135. The importance of the Jewish population to the development of the urban economy can be inferred from charters Afonso granted in 1170 to the non-Christian merchants living in Lisbon, Almada, Palmela and Alcacer. These charters guaranteed the Jewish minorities in the towns freedom of worship and the use of traditional law-codes.