Royal elections in Poland (Polish: wolna elekcja, lit. free election) was the election of individual kings, rather than of dynasties, to the Polish throne. Based on traditions dating to the very beginning of the Polish statehood, strengthened during the Piast and Jagiellon dynasties, they reached their final form in the period of the Polish-Lithuanian Commonwealth between 1572 and 1791. The "free election" was abolished by the Constitution of May 3, 1791.
The tradition of electing the ruler of the country, which occurred either when there was no clear heir to the throne, or to confirm the heir's appointment, dates to the very beginning of Polish statehood. Legends survive of the 9th-century election of the legendary founder of the first Polish royal family, Piast the Wheelwright of the Piast dynasty, and of a similar election of his son, Siemowit (that would place a Polish ruler's election a century before the earliest Icelandic ones by the Althing), but sources for that time are very sparse, and it is hard to estimate to whether those elections were more than a formality. The election privilege, exercised during the gatherings known as wiec, was usually limited to the most powerful nobles (magnates) or officials, and was heavily influenced by local traditions and strength of the ruler.
Traditions diverged in different regions of Poland during the period of fragmentation of Poland. In the Duchy of Masovia, the hereditary principle dominated, but in the Seniorate Province, elections became increasingly important. In the other provinces both elements mixed together. By the 12th or 13th centuries, the wiec institution limited participation to high-ranking nobles and officials. The nationwide wiec gatherings of officials in 1306 and 1310 can be seen as a precursor of the general sejm (Polish parliament).