The history of the Jews in Lithuania spans the period from the 14th century to the present day. There is still a small community in the country, as well as an extensive Lithuanian Jewish diaspora in Israel, the United States and other countries. The origin of the Jews of Lithuania has been a subject of much speculation. The first reliable document attesting the presence of Jews in the Grand Duchy of Lithuania is the charter of 1388 granting privileges to the Jews in Trakai. The gathering together of the scattered Jewish settlers in sufficient numbers and with enough power to form communities and to obtain privileges from their Lithuanian rulers implies the lapse of considerable time from the first migrations. Therefore, various historians attempted to claim that Jews migrated to Lithuania earlier. For example, Abraham Harkavy (1835–1919) claimed that the first Jews migrated in the 10th century from the Khazar Khaganate (see also Khazar hypothesis of Ashkenazi ancestry). Other historians claim that Jews migrated from Germany in the 12th century. German Jews were persecuted during the era of crusades. The traditional language of the vast majority of Jews of Lithuania, Yiddish, is based largely upon the Medieval German spoken by the western Germanic Jewish immigrants. Another theory is that Jews migrated during the reign of Grand Duke Gediminas (reigned 1316–1341) attracted by his invitation of merchants and craftspeople in 1323–1324 and economic opportunities – at the time, Lithuania had no cities in the western sense of the word, no Magdeburg Rights or closed guilds. In the 14th century, the Grand Duchy of Lithuania expanded into Galicia–Volhynia (see Galicia–Volhynia Wars) and the Principality of Kiev (see Battle on the Irpin River and Battle of Blue Waters), territories already inhabited by Jews. After the death of Casimir III (1370), the condition of the Polish Jews changed for the worse.