The Kingdom of Wessex (; , ) was an Anglo-Saxon kingdom in the south of Great Britain, from 519 until England was unified by Æthelstan in 927. The Anglo-Saxons believed that Wessex was founded by Cerdic and Cynric of the Gewisse, but this may be a legend. The two main sources for the history of Wessex are the Anglo-Saxon Chronicle and the West Saxon Genealogical Regnal List, which sometimes conflict. Wessex became a Christian kingdom after Cenwalh was baptised and was expanded under his rule. Cædwalla later conquered Sussex, Kent and the Isle of Wight. His successor, Ine, issued one of the oldest surviving English law codes and established a second West Saxon bishopric. The throne subsequently passed to a series of kings with unknown genealogies. During the 8th century, as the hegemony of Mercia grew, Wessex largely retained its independence. It was during this period that the system of shires was established. Under Egbert, Surrey, Sussex, Kent, Essex, and Mercia, along with parts of Dumnonia, were conquered. He also obtained the overlordship of the Northumbrian king. However, Mercian independence was restored in 830. During the reign of his successor, Æthelwulf, a Danish army arrived in the Thames estuary, but was decisively defeated. When Æthelwulf's son, Æthelbald, usurped the throne, the kingdom was divided to avoid war. Æthelwulf was succeeded in turn by his four sons, the youngest being Alfred the Great. Wessex was invaded by the Danes in 871, and Alfred was compelled to pay them to leave. They returned in 876, but were forced to withdraw. In 878 they forced Alfred to flee to the Somerset Levels, but were eventually defeated at the Battle of Edington. During his reign Alfred issued a new law code, gathered scholars to his court and was able to devote funds to building ships, organising an army and establishing a system of burhs. Alfred's son, Edward, captured the eastern Midlands and East Anglia from the Danes and became ruler of Mercia in 918 upon the death of his sister, Æthelflæd. Edward's son, Æthelstan, conquered Northumbria in 927, and England became a unified kingdom for the first time. Cnut the Great, who conquered England in 1016, created the wealthy and powerful earldom of Wessex, but in 1066 Harold Godwinson reunited the earldom with the crown and Wessex ceased to exist. History Background From the Neolithic onwards the chalk downland of the area that would