Year 840 (DCCCXL) was a leap year starting on Thursday in the Julian calendar, the 840th year of the Common Era (CE) and Anno Domini (AD) designations, the 840th year of the 1st millennium, the 40th year of the 9th century, and the 1st year of the 840s decade. Events By place Europe June 20 – Emperor Louis the Pious falls ill and dies at his hunting lodge, on an island in the Rhine, near his imperial palace at Ingelheim, while suppressing a revolt. His eldest son Lothair I succeeds him as Holy Roman Emperor, and tries to seize all the territories of the late Charlemagne. Charles the Bald, 17, becomes king of the Franks, and joins with his half-brother Louis the German, in resisting Lothair. Vikings from Norway capture Dublin, and establish a Norse kingdom in Ireland. Britain King Wigstan of Mercia, grandson of former ruler Wiglaf (see 839), declines his kingship in preference of the religious life. He asks his widowed mother, Princess Ælfflæd, to act as regent. A nobleman of the line of the late king Beornred, named Berhtric, wishes to marry her but he is a relative. Wigstan refuses the match, and is murdered by followers of Berhtric at Wistow. He is buried at Repton Abbey, and later revered as a saint. The Mercian throne is seized by Berhtric's father, Beorhtwulf. Vikings make permanent settlements with their first 'wintering over', located at Lough Neagh in Northern Ireland (approximate date). Asia Emperor Wenzong (Li Ang) dies after a 13-year reign, in which he has failed to break the power of his palace eunuchs. He is succeeded by his brother Wu Zong, as Chinese ruler of the Tang Dynasty. The Yenisei Kirghiz settle along the Yenisei River, and sack with a force of around 80,000 horsemen the Uyghur capital, Ordu-Baliq (driving the Uyghurs out of Mongolia). This ends the Uyghur Khaganate. The 840 Erzurum earthquake takes place in the city of Qaliqala (modern Erzurum). By topic Religion Nobis becomes bishop of St. David's, in the Welsh Kingdom of Dyfed (approximate date). Births January – Michael III, Byzantine emperor ( 867) This date of birth is generally held as uncertain; though January 840 is the most probable, 839 is also possible. October 25 – Ya'qub ibn al-Layth al-Saffar, founder of the Saffarid dynasty ( 879) Abu al-Hassan al-Nuri, Muslim Sufi (approximate date) Adalhard II, Frankish nobleman (approximate date) Berengaudus,