Dublin was a Viking town until 1014, when Brian Boru defeated the Vikings at nearby Clontarf. The Vikings established themselves again until Richard Strongbow, 2d earl of Pembroke, captured the city for the English in 1170. In 1172, Henry II of England came to Dublin and granted the city to the "men of Bristol"; it became the seat of English government and center of the Pale. In 1209 occurred the Black Monday massacre of English residents. Edward Bruce unsuccessfully assaulted the town in the early 14th cent.
In the English civil war the city surrendered (1647) to the parliamentarians, and Oliver Cromwell landed there in 1649. James II held (1689) his last Parliament in Dublin. After winning the battle of the Boyne, William III entered the city in 1690.
From 1782 to 1800, when the Irish Parliament (the so-called Grattan's Parliament) enjoyed temporary independence of England, Dublin experienced a prosperous and stimulating era; many of the city's buildings date from this period. After the Act of Union of 1800, which sent Irish representatives to the British Parliament, many wealthy aristocrats moved from their Dublin mansions to London, and the years of prosperity ended.
In the 19th cent. Dublin saw much bloodshed in connection with nationalist efforts to free Ireland from English rule—the insurrection led by Robert Emmet in 1803; the 1867 uprising of the Fenian movement; and the murder (1882) of Lord Frederick Cavendish, chief secretary for Ireland, and his undersecretary in Phoenix Park during terrorist activity and agitation by the Land League. Dublin also became the center of a Gaelic renaissance: the Gaelic League was founded there in 1893, and the Abbey Theatre began producing Irish plays. In 1913 the city was paralyzed by strikes, eventually culminating in the Easter Rebellion of 1916. The early troubles of the Irish Free State led to the worst period of bloodshed in Dublin's history (see Ireland, Republic of).