The First Viking Age in Ireland began in 795, when Vikings began carrying out hit-and-run raids on Gaelic Irish coastal settlements. Over the following decades the raiding parties became bigger and better organized; inland settlements were targeted as well as coastal ones; and the raiders built naval encampments known as longphorts to allow them to remain in Ireland throughout the winter. In the mid 9th century, Viking leader Turgeis or Thorgest founded a stronghold at Dublin, plundered Leinster and Meath, and raided other parts of Ireland. He was killed by the High King, Máel Sechnaill mac Máele Ruanaid, which was followed by several Irish victories against the Vikings and the seizure of Dublin in 849. Shortly after, a new group of Vikings known as the Dubgaill ("dark foreigners") came to Ireland and clashed with the earlier Viking settlers, now called the Finngaill ("fair foreigners").
The wavering fortunes of these three groups and their shifting alliances, together with the shortcomings of contemporary records and the inaccuracy of later accounts, make this period one of the most complicated and least understood in the fledgling city's history. In 853 a Viking warlord called Amlaíb (Old Norse: Óláfr, possibly Olaf the White) arrived and made himself king of Dublin. He ruled along with his brothers Ímar (Ívarr, possibly Ivar the Boneless) and Auisle (Ásl). For the next fifteen years or so, they used Dublin as their base for a series of campaigns against Irish kingdoms. During these conflicts they briefly allied themselves with several Irish kings.
The Dublin Vikings also carried out a number of raids in Great Britain at this time. The deaths of Ivar (c.873) and Olaf (c.874) were followed by internecine conflict among the Vikings. Although intermittent warfare between the Vikings and the Irish continued, these inner conflicts weakened the Viking colonies and made it easier for the Irish to unite against them. In 902, Cerball mac Muirecáin, king of Leinster, and Máel Findia mac Flannacáin, king of Brega, launched a two-pronged attack on Dublin and drove the Vikings from the city. However, in 914 the Vikings now known as the Uí Ímair (House of Ivar) would return to Ireland, marking the beginning of the Second Viking Age.