France originated as West Francia (Francia Occidentalis), the western half of the Carolingian Empire, with the Treaty of Verdun (843). A branch of the Carolingian dynasty continued to rule until 987, when Hugh Capet was elected king and founded the Capetian dynasty. The territory remained known as Francia and its ruler as rex Francorum ("king of the Franks") well into the High Middle Ages. The first king calling himself roi de France ("king of France") was Philip II, in 1190. France continued to be ruled by the Capetians and their cadet lines—the Valois and Bourbon—until the monarchy was overthrown in 1792 during the French Revolution.