 In 1431 the Counts of Celje built a castle at Villa Bassa (now part of Tarvisio), which belonged to the town until 1848.Kranjska Gora came under Ottoman attack in 1476.A railroad connection was built to Kranjska Gora in 1870.