For almost 300 years, the Vikings would continue to invade Britain, which was, at the time, fractured into several different kingdoms, none of which were really strong enough to repel the well-trained, well-prepared invaders. Early raids stuck to the coasts, but eventually the Vikings grew bolder, moving inland and capturing great cities like York, where some of the invaders settled and became craftsmen and farmers. In late 867, they captured Northumbria and installed an English puppet king. In 870, the Great Summer Army arrived in England and met up with the Great Heathen Army, which was based in York (now renamed Jorvik). The Vikings planned to invade the southern kingdom of Wessex, but the leader, Bagsecg, was killed at the Battle of Ashdown, and the army retreated back north. King Alfred of Wessex was one of the few rulers in Britain able to repel the invaders. He and his successors eventually managed to drive the Vikings back and retake York, which was later recaptured by Erik Bloodaxe in 947. The Vikings continued to have a presence in Britain until the 11th century, when their presence in the country began to dwindle. They were defeated by the English at Stamford Bridge in 1066, and just 19 days later, the weakened English army was defeated by the invading Normans at the Battle of Hastings.
The Viking presence was also significant in Ireland. They raided the island, founded Dublin, Cork, and Limerick, and then settled down and started intermixing with the locals, leaving a definite mark on Irish literature, crafts, and decorative styles, as they did in Britain. Throughout the 9th century they pushed deeper into Ireland, sacking monasteries and towns and establishing bases in strategic locations. The last major battle they were involved in in Ireland was the Battle of Clontarf in April 1014. Viking warriors actually fought on both sides in that conflict, which ended with the death of legendary Irish king Brian Boru.