Kozje is a small town and a municipality in eastern Slovenia. The settlement of Kozje lies in the centre of the municipality, 36 km (22.37 mi) from Celje, 107 km (66.49 mi) from Ljubljana, and 30 km (18.64 mi) from Rogaška Slatina. It is the main settlement of the Kozje region (Slovene: Kozjansko). The area was part of the traditional region of Lower Styria. The municipality is now included in the Savinja statistical region. It is one of the oldest settlements in the area, first mentioned in written documents dating to 1016. It was granted market rights before 1384.