The Doge of Venice was the chief magistrate and leader of the Republic of Venice between 726 and 1797. The Doges of Venice were elected for life by the city-state aristocracy. The title was reserved for the senior-most elected official of Venice. The same arrangement existed for another location, the Republic of Genoa. Both cities were republics and elected doges.

The selection of the doge evolved from a position entrusted to the members of powerful Venetian families who tended toward a hereditary monarchy, to a process that was entrusted to a committee of 40, who were chosen by four men selected from the Great Council of Venice, which was itself nominated annually by 12 persons.

While this evolved system worked well for a period of time, a deadlock tie at the election of 1229, resulted in a change in the number of electors from 40 to 41. Then in 1268, further changes were implemented to minimize the influence of individual powerful families and these detailed and complex changes remained in effect until 1797.

One of the ceremonial duties of the doge was to celebrate the symbolic marriage of Venice with the sea. This was done by casting a ring from the state barge, into the Adriatic.

The last doge abdicated in 1797 when Venice passed under the power of Napolean’s France following his conquest of the city.

More Info: en.m.wikipedia.org