The Doge was the nominal head of the Venetian Republic.
In the earliest period the doge wielded at lot of power, and many of the early doges tried to turn power hereditary.
This lead to the election process becoming increasingly complex and arcane over the centuries, because the Venetian ruling aristocracy was always afraid that any single family could grab power for themselves, turning the republic into a monarchy.
The Venetian elite also devised a system of checks and balances, thereby limiting the power of the doge.
Why a doge?
The doge was there at the beginning of the republic.
In the late Roman Empire the military forces in a province were led by a dux, which simply means a leader. Normally the imperial government chose the dux along with the governor. However, at times in some provinces the empire left it to the locals.
Venice grew and became powerful, and the Venetian elite simply started disregarding the appointments from Byzantium, and elected their dux themselves.
From leader of the military he became leader of the state.
The first doges
Due to the way the Venetian Republic started, there was no formal constitution and no rules to limit the power of the doge or establish a procedure of succession.
As leaders of the navy and the military the early doges had a lot of power over the affairs of the state.
Many appointed their oldest son co-ruler as their first decision in office, in obvious attempts at securing a succession within the family.
This never went down well with the other dominant families, and it often ended in violence. Many of the early doges died a violent death in fights between different factions of the aristocracy. The victors would depose, sometimes blind, and often force the ex-doge into a monastery.
Resolving political problems with physical violence is dangerous and generally not good for business. Getting killed in such a fight is particularly bad for business.
Gradually the Venetian elite sought ways of limiting the role of violence in politics.
Checks and balances
To achieve a more pacific political process, the Venetian elite created a formal assembly of all eligible voters. This developed into the Consiglio Maggiore, the major or larger council, where they could debate and vote on the most important decisions of the state.
With over two thousand members the major council was too unwieldy for day to day business.
Consequently the major council elected a smaller group of six sages, one from each sestiere of the city. This became the Consiglio Minore, the minor or smaller council.
The minor council functioned as a check on the power of the doge. The doge could take no major decisions without the consent of the minor council. Limits on the actions of the doge meant for example that diplomatic dispatches could only be opened in the presence of the councillors.
The Promissione Ducale
Another way of limiting the power of the doge was to have the newly elected doge make an oath of fair government.
Over the centuries this oath became formalised into a document the new doge had to sign to assume office.
The earliest such written oaths, called the promissione ducale, were rather short documents of a few dozen pages. However, repeated additions and elaboration led to a document of hundreds of pages.
In the later period of the Venetian Republic the doge had become a figurehead with little real influence over the matters of the state.
The Election Process
Even with the powers of the doge limited, the issue of succession was still important.
With the Major Council as the highest authority of the state, the election of a new doge fell to that institution.
The procedure changed many times, but in 1268 it found its final form of several rounds of elections of committees whose members were reduce by lot.
First a group of thirty members of the Major Council was selected by lot.
This group was reduced to nine by lot. These nine men elected a group of forty, each with a required majority of seven votes. The group of forty was reduced to twelve, again by lot.
The twelve chose, with a majority of nine, a new group of twenty-five, reduced to nine by lot.
The nine elected forty-five, majority of seven, reduced to eleven by lot.
These eleven men, majority of nine, elected the final group of forty-one men, who chose the new doge. The required majority was of twenty-five votes.
The missing constitution
The missing formal constitution forced the Venetian ruling class to find ad-hoc solutions to many constitutional problems.
The power of the doge and the question of succession were some of the more difficult problems. Failure to resolve these problems repeatedly led to fighting within the upper class.
The last such fight followed the attempted coup of Marin Falier in 1355.
The purpose of the election procedure, of the Minor Council, and of the promissione ducale was to avoid that any single family or group of families could accumulate too much power, and hence upset the very delicate power balance within the aristocracy.
Nobody wanted to be inferior to any ruling dynasty.