A secondary Roman road linking Emona (Ljubljana) and Virunum (near today’s Klagenfurt in Austria) ran through Kranj until about the 5th century; a hundred years later the marauding Langobards established a base here. They were followed by tribes of early Slavs, whose large burial grounds can be partly seen below the floor of the Gorenjska Museum in the old town hall.
In the 11th century, Kranj was an important border stronghold of the Frankish counts in their battles with the Hungarians, and the town gave its name to the entire region – Kranjska (Carniola in English). It was also an important market and ecclesiastical centre, and within 200 years Kranj was granted town status by the new rulers, the Bavarian Counts of Andechs. More wealth came with the development of iron mining and foundries, and when the progressive Protestant movement reached Gorenjska, it was centred in Kranj. The city grew faster after the arrival of the railway in 1870.