In April 1016, Æthelred died of illness, leaving his son and successor Edmund Ironside to defend the country. The final struggles were complicated by internal dissension, and especially by the treacherous acts of Ealdorman Eadric of Mercia, who opportunistically changed sides to Cnut's party. After the defeat of the English in the Battle of Assandun in October 1016, Edmund and Cnut agreed to divide the kingdom so that Edmund would rule Wessex and Cnut Mercia, but Edmund died soon after his defeat in November 1016, making it possible for Cnut to seize power over all England.