The Holy Roman Empire (; ), occasionally but unofficially referred to as the Holy Roman Empire of the German Nation, was a group of regions and free cities in central Europe which all came under the rule of an emperor who was elected by the princes and magistrates of the regions and cities within the empire. When Charlemagne died, his Frankish Empire was given to his children and divided into three different countries: West Francia, Lotharingia and East Francia. The Holy Empire started when Otto I of East Francia became emperor in 962, and it was ended by Napoleon in 1806. The emperors claimed to be heirs of Charlemagne and that the Empire dates from 800, when Charlemagne became Frankish Emperor.