The year 865 saw the arrival of the Great Heathen Army in East Anglia. One by one the Anglo-Saxon kingdoms were defeated by the Danes (Vikings). By the close of the ninth century the last four independent kingdoms of England had been reduced to just one. Wessex was the only remaining kingdom not destroyed by the Vikings. Under Alfred the Great Wessex became the core of a unified England. His grandson, Athelstan was the first King of England.