Rhodri the Great (in Welsh, "Rhodri Mawr") (about 820-878) was the first ruler of Wales to be called "Great", and the first to rule most of present-day Wales. The son of Merfyn Frych, he inherited the principality of Gwynedd on his father's death in 844, and Powys from his uncle. He proceeded to marry Angharad, daughter of the ruler of Seisyllwg, which he duly inherited on the accidental death of his brother-in-law in 871. Rhodri succeeded in holding off both Viking and Saxon invaders, offering security to his subjects at a time of great danger and unrest throughout the British Isles. It was, however, the Vikings who drove Rhodri away from his home territory in 877, and he fled to Ireland. Returning the following year in an attempt to regain his kingdom, he was killed in battle against the Mercians.