In the history of Europe, the Middle Ages or medieval period lasted approximately from the 5th to the late 15th centuries, comparable with the post-classical period of global history. It began with the fall of the Western Roman Empire and transitioned into the Renaissance and the Age of Discovery. The Middle Ages is the middle period of the three traditional divisions of Western history: classical antiquity, the medieval period, and the modern period. The medieval period is itself subdivided into the Early, High, and Late Middle Ages.
Population decline, counterurbanisation, the collapse of centralised authority, invasions, and mass migrations of tribes, which had begun in Late antiquity (c. ~3rdā8th centuries) and into the Early Middle Ages (c. 5thā10th centuries). The large-scale movements of the Migration Period, including various Germanic peoples, formed new kingdoms in what remained of the Western Roman Empire. In the 7th century, North Africa and the Middle Eastāonce part of the Byzantine Empireācame under the rule of the Umayyad Caliphate, an Islamic empire, after conquest by Muhammad's successors. Although there were substantial changes in society and political structures, the break with classical antiquity was incomplete. The still-sizeable Byzantine Empire, Rome's direct continuation, survived in the Eastern Mediterranean and remained a major power. The empire's law code, the Corpus Juris Civilis or "Code of Justinian", was rediscovered in Northern Italy in the 11th century. In the West, most kingdoms incorporated the few extant Roman institutions. Monasteries were founded as campaigns to Christianise the remaining pagans across Europe continued. The Franks, under the Carolingian dynasty, briefly established the Carolingian Empire during the later 8th and early 9th centuries. It covered much of Western Europe but later succumbed to the pressures of internal civil wars combined with external invasions: Vikings from the north, Magyars from the east, and Saracens from the south.