Earlier, in the 17th century, Jews were banished from Switzerland. However, a few families were permitted to live in two villages, Endingen and Lengnau, of Aargau. These towns became the Jewish ghettos of Switzerland. Eventually Aargau was the first to grant citizenship to Jewish-Swiss and, by 1877, the whole of Switzerland granted citizenship. Jews were still restricted to Endingen and Lengnau until May 7, 1846, when their right to move and reside freely within the whole canton of Aargau was granted.