Venice and Genoa were medieval city states arising out of the chaos following the dissolution of the Roman Empire in Italy by barbarian invaders. Both were in protected locations and relied on sea trade for their prosperity. The chief officer of these principalities was called the "doge" (from the Latin "dux"--leader). The first doge in Venice was elected in 697. In Venice the office came to an end when the Republic of Venice was overthrown by Napoleon in 1797. Altogether there were 120 doges of Venice.
An important ritual in Venice was the marriage of the doge with the sea, which was symbolized by the doge casting a gold ring into the lagoon.