From the 850s, Carolingian rule was becoming both fragmented and weaker. Kings from Charles' line continued to vie with brothers and rising notables. At the same time, foreign threats to Europe pressed from the northern, southern, and eastern margins. The first threat came from the Mediterranean area. From the 810s, the Abbasid Caliphate centered at Baghdad started to break apart west of Egypt into smaller emirates led by Abbasid governors. One was the Aghlabid Emirate, centered in Tunisia. Muslims independent of Baghdad controlled Spain. In 825, groups from Spain captured Crete, a Byzantine island. Used from then as a pirate base, Arab Muslims then went on to attack areas all along the southern Mediterranean coast. In 827, the Aghlabids began the conquest of Sicily, completed by the 850s. They proceeded to colonize Sardinia and Corsica, going as far northwest as the Rhone delta in France. Farther east, Aghlabids used Sicily as a base to raid up to Rome in 843, as well as Calabria and Apulia, from which they crossed the Adriatic to harass Dalmatia, and Cyprus. Muslim bases on the Italian mainland continued until 915, when they were ousted by a Byzantine fleet. By 1000, the Muslims had lost Crete, yet the Fatimid Caliphate in Egypt still held Sicily, and the Spanish Ummayads held islands in the western Mediterranean.
The threat from the southeast came in the form of the Magyars, a pagan people originating north of the Crimea. Pushed west by Patzinak Turks in the 890s, they came to Hungary, pushing the Bulgars south. The German King Arnulf asked them to punish the Czech Kingdom of Moravia to the east of Germany and Burgundy in 892. After destroying it in the 900-910s, they turned to raiding in Germany, Italy, as well as Burgundy, France, and Provence. Advancing to Pavia, they wintered in Lombardy in 899, then moving to Carinthia. Next they hit Saxony (906), Bavaria (907), Thuringia (908) and Swabia (909). Two years later, Louis the Child died. The last descendant of Charlemagne from Louis the German, he had been quite weak. German nobles decided to give allegiance to Conrad of Franconia, a non-dominant duke. He was not able to stop Hungarian invasions. From 917-925, they ranged through Basle, Alsace, Burgundy, Saxony, and Provence. During these same years, Conrad's rule had passed to Henry the Fowler, Duke of Saxony. He was the first non-Frankish king of the Germans, and spent the first six years of his rule in fighting of other dukes. Only Franconia was cooperative, with the dukes of Swabia, Lotharingia, and Bavaria resenting his pretensions to untrammeled leadership of eastern Francia.
These civil wars only ended in 924, with new large-scar Magyar raids. In 937, Magyars raided as far west as Reims in France. At first, Henry focused on defending only his home duchy of Saxony. By capturing a Hungarian war leader, he secured a truce for the region. By 933, he felt strong enough to refuse further payments of tribute to the Hungarians. When the Hungarians launched a massive punitive expedition, Henry routed it at Unstrut. In 934 as well, he pushed Danes away from central German lands. When he died in 936, he was hailed as 'lord emperor'. Within twenty years, Magyars receded as a threat to the West. After facing internal revolts similar to those during his father Henry's time, German King Otto I met Magyars in battle at Lechfeld in Bavaria in 955, defeating them so decisively that they never left Hungary again, except to raid lightly in Byzantium. By 1000 the Magyar Duke Stephen Arpad had begun the Christianization process under Papal auspices.
By far more destructive and consequential were the Viking incursions, from the early 800s to the 920s. They affected three major areas: Britain, the Carolingian lands, and Russia. Britain was the first region targeted, starting from the 780s. By 785, monasteries in Lindisfarme (793) and Jarrow were destroyed. Norsemen then began to raid the Shetland Islands, the Orkneys, and the Faroes, after which they moved down between the Western Scottish Islands and Ireland, which became the focus for the next few years. Dublin, Wexford, and Waterford were hit, as was western Scotland. Around this time (820s), the south English King of Wessex was increasing his holdings against the Mercians north of him as well as the Welsh to his west. Wessex was the chief adversary to the Vikings, who refocused their energies on England from the 840s. In 866, the 'great army' of Danish Vikings invaded southeastern England, overrunning East Anglia, Northumbria, and Mercia by 877. They were stopped only by King Alfred the Great (r. 871-899) of Wessex, who defeated them at Edington in 878. By 885, West Saxon power convinced Vikings to make an agreement, whereby only East Anglia, eastern Mercia, and nearby counties would remain in Viking hands, called the Danelaw. Alfred also insisted that Danish Vikings in Britain accept Christianity. By the 920s, Wessex had taken back most of the Danelaw, by which time the Vikings had moved west across the water to Ireland again, establishing the Kingdom of Dublin, which helped them to take York. This area was annexed by the English in 927, when its king died, but was subjected to Scottish-Norse attacks in the 930s. By the 940s, Wessex had established firm control up through York, becoming the Kingdom of Saxon England. By the 950s, only northern Scotland, the Earldom of Orkney, remained as a Viking possession, while the Vikings' places of origin were stabilizing as the Kingdoms of Norway, Sweden, and Denmark.
In Russia, the Swedish Vikings were known as Varangians, invading Slavic lands from the Baltic Sea. By the 860s, the Varangians established three fortified enclaves at Beloozero in the Northeast, Novgorod in the North-Central areas, and Izborsk below the Gulf of Finland. By the 880s, they had extended their raids and migrations south to the Dneiper in the West, with new outposts at Polotsk, Smolensk, and even Kiev north of the Crimea. In the East, they focused on the upper Volga, with new settlements on Rostov and Murom. From there, raids extended at times to Byzantium and Constantinople, with which they also traded. In the next century, Byzantine Emperors assembled a personal protective force called the Varangian Guard. In the tenth century, the Varangians created a unified Russian principality encompassing the region's Slavs and descending to the Crimea. Based on the Rurikovitch dynasty at Kiev, by the middle of the century under Sviatoslav, Varangians had been demographically swallowed by Slavs. The king led expeditions against the Khazars (965), Volga Bulgars (966) and the Lower Danube Bulgar Khanate (967), but was not able to penetrate Byzantine Balkans, and was killed in a Patzinak ambush (972). At this point, both Roman and Orthodox Christianity were making inroads among the Russians. Vladimir I, Prince of Kiev (980-1015), officially accepted the Orthodox rite through an accord with resurgent Byzantium under Basil II (r. 976-1025) whereby he also agreed to marry the Emperor's daughter, establishing lasting cultural ties.
From the 830s-910s, the Norsemen also ravaged Frankish realms. From 814, small summer raids had affected the coast areas such as Nourmoutier at the opening of the Loire. From 840, turning away from Britain for a while, they focused on Europe in earnest, hitting Nourmoutier, Antwerp, and Utrecht. In 841, a Viking fleet entered the mouth of the Seine and sacked Rouen. Two years later they entered the Loire, burned Nantes, moving to plunder the valleys of the Garonne, even threatening Muslim Lisbon. They then wintered on Nourmoutier. As they also established winter bases on Thanet Isle near the Thames, a new phase of occupation-settlement began. From the Loire base they ravaged the Garonne and the Spanish coast. Between 845 and 857, Seville, Bordeaux, Tours, Blois, Orleans, and Poitiers were hit. Beginning it was the sack of Paris with 120 ships. From 859-862 a sustained Viking 'tour' was undertaken. Sailing from Nourmoutier on the Loire, they plundered their why down the French and Iberian coasts, hitting Lisbon on the way. Crossing through Gibraltar, they then raided Morocco, the southern coast of Spain, the Balearic Islands, and Barcelona. The Norsemen then spent the winter on the mouth of the Rhone, near Marseilles. In the next year, they then raided throughout southern France, as far north as Valence. Turning east, they sacked Pisa and Luna in Italy, mistaking the latter for Rome. They then returned to Nourmoutier over the next years, by the same route, ravaging as they went.