Little is known of the first 20 years of Ecgberht's reign, but it is thought that he was able to maintain the independence of Wessex against the kingdom of Mercia, which at that time dominated the other southern English kingdoms. In 825 Ecgberht defeated Beornwulf of Mercia, ended Mercia's supremacy at the Battle of Ellandun, and proceeded to take control of the Mercian dependencies in southeastern England. In 829 he defeated Wiglaf of Mercia and drove him out of his kingdom, temporarily ruling Mercia directly.