The City of Dublin can trace its origin back more than 1,000 years, and for much of this time it has been Ireland's principal city and the cultural, educational and industrial centre of the island.
The earliest reference to Dublin is sometimes said to be found in the writings of Claudius Ptolemaeus (Ptolemy), the Egyptian-Greek astronomer and cartographer, around the year 140, who refers to a settlement called Eblana. This would seem to give Dublin a just claim to nearly two thousand years of antiquity, as the settlement must have existed a considerable time before Ptolemy became aware of it. Recently, however, doubt has been cast on the identification of Eblana with Dublin, and the similarity of the two names is now thought to be coincidental.
It is now thought that the Viking settlement was preceded by a Christian ecclesiastical settlement known as Duiblinn, from which Dyflin took its name. Beginning in the 9th and 10th century, there were two settlements where the modern city stands. The Viking settlement of about 841 was known as Dyflin, from the Irish Duiblinn (or "Black Pool", referring to a dark tidal pool where the River Poddle entered the Liffey on the site of the Castle Gardens at the rear of Dublin Castle), and a Gaelic settlement, Áth Cliath ("ford of hurdles") was further upriver, at the present day Father Mathew Bridge at the bottom of Church Street. The Celtic settlement's name is still used as the Irish name of the modern city, though the first written evidence of it is found in the Annals of Ulster of 1368. The modern English name came from the Viking settlement of Dyflin, which derived its name from the Irish Duiblinn. The Vikings, or Ostmen as they called themselves, ruled Dublin for almost three centuries, although they were expelled in 902 only to return in 917 and notwithstanding their defeat by the Irish High King Brian Boru at the Battle of Clontarf in 1014. From that date, the Norse were a minor political force in Ireland, firmly opting for a commercial life. Viking rule of Dublin would end completely in 1171 when the city was captured by King Dermot MacMurrough of Leinster, with the aid of Anglo-Norman mercenaries. An attempt was made by the last Norse King of Dublin, Ascall mac Ragnaill, to recapture the city with an army he raised among his relations in the Scottish Highlands, where he was forced to flee after the city was taken, but the attempted reconquest failed and Ascall was killed.