The town has centuries-old history. There are antiques from I-II century. Its first name was Sportela and it was part of Pautalia (today Kyustendil). Another name of the town was Roligera. In 1378 in the kingdom of king Ivan Shishman the town was called Driska. In the 15th century Rila was the feudal ownership of Rila monastery. There is information about the name Irlie in the tourist register from 1576.