After the fall of the Western Roman Empire, it was ruled by the Lombards (6th century) and the Carolingians (8th century); the famous Belluno Treasure in the British Museum dates from this period. From the late 9th century it was ruled by a count-bishop and it received a castle and a line of walls. Later it was a possession of the Ghibelline family of the Ezzelino. After having longly contended the nearby territory with Treviso, in the end Belluno gave itself to the Republic of Venice (1404). The city was thenceforth an important hub for the transport of lumber from the Cadore through the Piave river. It remained Venetian until 1797. After the fall of the Republic, Belluno was an Austrian possession, until it was annexed to the Kingdom of Italy in 1866.