Dupnitsa, or Dupnica, is a town in Western Bulgaria. It is at the foot of the highest mountain in the Balkan Peninsula – the Rila Mountain, and about 50 km (31 mi) south of the capital Sofia. Dupnitsa is the second largest town in Kyustendil Province.