It was founded during the Roman Empire as Luliomontium (Mount Julius). While not documented, archaeological excavations near the city have revealed the remains of a Roman military camp from the time of the Marcoman Wars in the late 2nd century.
In the late 7th century, the first Slavic settlement was established there.