His cognomen "Ironside" is not recorded until 1057, but may have been contemporary. According to the Anglo-Saxon Chronicle , it was given to him "because of his valour" in resisting the Danish invasion led by Cnut the Great . He fought five battles against the Danes, ending in defeat against Cnut on 18 October at the Battle of Assandun , after which they agreed to divide the kingdom, Edmund taking Wessex and Cnut the rest of the country. Edmund died shortly afterwards on 30 November, and Cnut became the king of all England.