Ban (/ˈbɑːn/) was the title of local rulers or officeholders, similar to viceroy, used in several states in Central and Southeastern Europe between the 7th and 20th centuries. The most common examples have been found in medieval Croatia and medieval regions ruled and influenced by the Kingdom of Hungary. They often ruled as the king's governmental representatives, supreme military commanders and judges, and in 18th century Croatia, even as chief government officials. In the Banate of Bosnia they were always de facto supreme rulers.