The Kingdom of the Lombards also known as the Lombard Kingdom; later the Kingdom of Italy, was an early medieval state established by the Lombards, a Germanic people, on the Italian Peninsula in the latter part of the 6th century. The king was traditionally elected by the very highest-ranking aristocrats, the dukes, as several attempts to establish a hereditary dynasty failed. The kingdom was subdivided into a varying number of duchies, ruled by semi-autonomous dukes, which were in turn subdivided into gastaldates at the municipal level. The capital of the kingdom and the center of its political life was Pavia in the modern northern Italian region of Lombardy.