During the Ottoman Empire, Jews like all other non-Muslims had a degree of autonomy under the Millet system which classified populations according to religion rather than ethnicity or language. Thessaloniki in particular had a large Jewish population, mostly consisting of Sephardim who settled in Ottoman lands after the 1492 expulsion of the Jews from Spain. Sephardim used to speak Ladino until well into the 20th century. The Romaniotes, on the other hand, are Jews who lived in the territory of today's Greece and neighboring areas for more than 2,000 years. Their language is Greek (and a Greek dialect called Yevanic language); they derive their name from the Byzantine name for the Greeks, "Rhomaioi".