The doge was the elected head of the Venetian Republic. He was elected for life by an arcane process that also included drawing lots.