Until the Partitions of the Polish–Lithuanian Commonwealth in late 18th century the area belonged to the Vilnius Voivodship and Trakai Voivodship of the Polish–Lithuanian Commonwealth. In Russian Empire it belonged to the Northwestern Krai and approximately corresponded to its Vilna Governorate (as of 1843). During World War I, following the German offensive of 1915, it was occupied by the German army. After the war, some parts of the area was ruled by local Polish self-government established after the German Ober-Ost army withdrew from the area.