Between the Late Middle Ages and 1797, part of the territory of the Slovenian Istria (almost entirely corresponding to the current municipalities of Koper, Izola and Piran) was under Venetian rule. During that period, the population of the coastal area, which had spoken various Romance dialects (either of Rhaeto-Romance or Istriot origin) adopted the Venetian dialect of Italian. During Austrian rule, which lasted until 1918, Italian was the official language of these areas, along with German. Only in the late 19th century, Slovene became co-official, but only in those rural areas where there was a Slovene ethnic majority.