When we look at the monarchies in Europe, working and deposed ones, we get the false impression of perpetuity as ‘it always had been that way’. In fact, the vast majority of dynasties started out as elected monarchs.
It all hinges on the definition of the word election. General elections are an invention of the 20th century and in that form are not applicable to elective processes taking place before that era; taking any kind of elective process into account on the other hand, all European countries had an elected monarch at one point or another or were part of the territory of such a monarch. The election processes as such varied widely, though, from country to country and over time.
The Holy Roman Empire is the most successful example for a country with an elected monarch. It had one for its full duration of over 800 years. Until the 13th century, the voting rights of the Eastern Frankish nobility were fairly general if not very clearly defined. By 1252, seven prince electors were holding the exclusive right to choose the monarch. The electors were made up by the Archbishop of Mainz (as Arch-Chancellor of Germany), the Archbishop of Cologne (as Arch-Chancellor of Italy), the Archbishop of Trier (as Arch-Chancellor of Burgundy), the Count Palatine by the Rhine (as Arch-Steward), the Duke of Saxony (as Arch-Marshal), the Margrave of Brandenburg (as Arch-Chamberlain), and the King of Bohemia (as Arch-Cupbearer). In the 17th century, the Dukes of Bavaria and of Brunswick-Luneburg were added to bring the number up to nine.
The Kingdom of Poland during the Polish-Lithuanian Commonwealth is an example of how it can go wrong. The nobles of Poland had the right to elect the king; as every son of every noble was born noble, too, about 10 percent of the Polish population had a vote. The nobles were interested in protecting their interests first and therefore elected foreign kings with little time and interest in interfering in internal Polish politics. The process eventually led to the downfall of Poland.
Of the 12 working monarchies in Europe, only four have not been elected in one form or another: The Kingdom of the Netherlands and the Grand-Duchy of Luxembourg were the result of the reorganization of Europe after Napoleon, Monaco was conquered by the first Grimaldi in 1297, and Liechtenstein was established by Imperial decree in 1712.
The current incumbents in the eight other monarchies are all in some degree the result of an election process. The Act of Settlement of 1707 in England and Scotland led to Princess Sophie of the Palatine becoming heiress presumptive to Queen Anne over the heads of 57 catholic relatives with stronger claims to the throne.
Norway’s parliament chose a Prince of Denmark to become its first king after its independence in 1905; in 1811, Sweden’s parliament elected the French Marshal Bernadotte as crown prince to childless King Christian XIII (himself elected by parliament after his nephew Gustav IV Adolf had been sent into exile); in Denmark, Prince Christian of Schleswig-Holstein-Sonderburg-Glücksburg was elected as crown prince to childless King Frederick VII in preference over his older brothers in 1852. The Belgian parliament elected Prince Leopold of Saxe-Coburg-Gotha as first King of the Belgians in 1830. King Juan-Carlos of Spain was designated as successor of General Franco (over his father’s claims) by act of parliament in 1969, and 88 percent of Spanish voters approved the new constitution in 1978.
The Principality of Andorra has two Princes, the Bishop of Seu d’Urgell elected according to the laws of the Catholic Church, and the President of France. Both are elected rulers, albeit Andorran’s don’t have a say in either election. And last but not least, the Pope is elected by the Conclave of Cardinals; the election is ruled by the laws of the Catholic Church and his position as Prince of Vatican State is but an outflow of his position as head of the Catholic Church.