IRELAND WAS ILL-PREPARED for this onslaught. Irish culture in the eighth century was supremely self-confident. It had its own style of Christianity, its own sophisticated legal system, distinctive and highly accomplished art, and a vernacular literature. Its agricultural economy and multitude of petty kingdoms did generate tribal and dynastic conflicts, but they were limited in scale. Indeed, one of the reasons Irish art is so spectacularly opulent in the eighth century is that this was a culture that could afford to put spare resources of wealth and craft into objects of beauty and devotional power rather than military technology and warriors.

The sudden eruption of an aggressive, pagan and initially destructive presence posed a real threat to this self-contained culture. It had to adapt or die. And there was a great deal to adapt to. Military technology had to be upgraded, most obviously by acquiring Viking weaponry. Kings had to develop at least a hard core of semiprofessional warriors. But the Vikings also changed the map of Ireland in ways that had long-term consequences for the natives.

The change can be symbolised by the shift in the centre of gravity from Tara to Dublin. The old Ireland looked, geographically as well as psychologically, inwards. It was the Vikings who developed not just towns but coastal towns: Dublin, Wexford, Cork, Limerick and Waterford. Not all of the Viking towns thrived: large settlements at Linn Duachaill, near Annagassan, in Co Louth, and Woodstown, just west of Waterford, both discovered only recently, lasted for relatively short periods.

There is a paradox here: the Scandinavians were no more an urban people than the Irish. Their own towns arose, in this same period of expansion, as merchant colonies. The founding of Ireland’s coastal cities was, moreover, as much a testament to Viking failures as to their successes. In Iceland, the Faroes and the Scottish islands, the Danish invaders simply occupied land. In northern England, they founded no cities, though they did occupy the old Roman town of York. What made them such prodigious founders of coastal towns in Ireland was the simple fact that they were unable to carve out large swathes of rural territory. They needed their fortified strongholds with quick access to the sea.

Yet, particularly as Irish power began to recover from the initial shock, native kings saw the value of this new way of life. They intermarried with the strangers and sucked them into their own quarrels and alliances. But they also tried increasingly to control and exploit the towns they had created. The Vikings brought with them a more developed commercial culture than Ireland had known: among the words that entered Irish from Old Norse is margad, market. And they gave the country one of the things it came to love more than all else: money.