Gofraid ua Ímair

Gofraid ua Ímair or Guthfrith of Ivar (Guðrøðr, Guthfridus, fl. from AD 918 until death in 934) was a Hiberno-Scandinavian (people of Gaelic and Scandinavian birth and Culture) and Viking leader who ruled Dublin and briefly Viking Northumbria in the early 10th century. He was a grandson of Ímar and a member of the Uí Ímair. Gofraid was most probably among those Vikings expelled from Dublin in 902, whereafter he helped his kinsman Ragnall conquer Northumbria. Another kinsman, Sitric Cáech, became ruler of Dublin around the same time. Ragnall died in 920, and so the following year Sitric left Dublin to rule in Northumbria, and Gofraid succeeded Sitric as ruler of Dublin. Sitric's early reign was marked by raids he conducted against the Gaelic (Native-Irish), including one at Armagh.

Sitric Cáech died in 927 and Gofraid left for Northumbria, delegating authority in Dublin to his sons. This upset the sons of Sitric, who allied with a "son of Helgi", possibly Tomrair mac Ailchi of Limerick, and seized the city. This act began a period of conflict between the Hiberno-Scandinavian of Dublin and Limerick which would last until 937. Gofraid's attempt to rule in Northumbria was unsuccessful and he was driven out by Æthelstan of England within six months. He returned to Dublin to eject the sons of Sitric and continued to rule as king there. Following his return he led further raids, including attacks on Kildare and Dunmore Cave. In 931 he led an attack on a camp established by the Hiberno-Scandinavian of Limerick at Mag Raigne, near the borders of Gofraid's kingdom, with the intent of containing Gofraid's power. Gofraid died of a sickness in 934 and he was succeeded as king by his son Amlaíb mac Gofraid.

Background
The ruling Vikings of Dublin were expelled from the city in 902 by a joint force led by Máel Finnia mac Flannacán, overking of Brega and Cerball mac Muirecáin, overking of Leinster. Those Vikings that survived the capture of the city split into different groups; some went to France, some to England, and some to Wales. Archaeological evidence suggests Dublin remained occupied in the years immediately following this expulsion, perhaps indicating only the ruling elite were forced to leave. However, Viking raids on Irish settlements continued, and in 914, a large Viking fleet travelled to Waterford. The arrival of this fleet marked the re-establishment of Viking rule over parts of Ireland, and was followed by more Vikings settling in Limerick the following year.

The main historical sources for this period are the Norse sagas and the Irish annals. Some of the annals, such as the Annals of Ulster, are believed to be contemporary accounts, whereas the sagas were written down at dates much later than the events they describe and are considered far less reliable. A few of the annals such as the Fragmentary Annals of Ireland and the Annals of the Four Masters were also compiled at later dates, in part from more contemporary material and in part from fragments of sagas. According to Downham, "apart from these additions [of saga fragments], Irish chronicles are considered by scholars to be largely accurate records, albeit partisan in their presentation of events".

Biography
Gofraid is presumed to have left Dublin with the rest of the ruling Vikings in 902. In 917 the Irish Annals describe two grandsons of Ímar, Sitric Cáech and Ragnall, leading their fleets to Ireland. Sitric sailed his fleet to Cenn Fuait in Leinster, and Ragnall sailed his fleet to Waterford. Niall Glúndub, overking of the Northern Uí Néill, saw these Vikings as a threat, and he marched an army south to repel them. Sitric and his army fought against the men of the Uí Néill at Mag Femen in County Tipperary and claimed victory, though only through timely reinforcement by Ragnall and his army. This was followed by another at the Battle of Confey (also known as the Battle of Cenn Fuait), against Augaire mac Ailella, overking of Leinster, who died in the battle. Augaire's death marked the end of effective opposition to the Vikings' return to Ireland. Sitric led his men on a triumphant return to Dublin, where he established himself as king, while Ragnall returned to England and soon became King of Northumbria.

Gofraid is first mentioned in the annals by the Annals of Ulster in 918, which describe him leading a battalion of troops at the Battle of Corbridge in northern England. This battle was fought between Ragnall and Constantín son of Áed, the king of Scotland, and although it was indecisive it allowed Ragnall to establish himself as king at York. In the annals' account Gofraid is fully titled Gofraid ua Ímair (Gofraid, grandson of Ímar), making him brother or cousin of Ragnall and Sitric Cáech. Ragnall died in 921 with Sitric Cáech succeeding him as King of Northumbria. Gofraid is mentioned by the annals that same year as taking control of Dublin. One of his first acts as King of Dublin was to lead a raid on Armagh. According to the Annals of Ulster and the Annals of the Four Masters the Dubliners ravaged a wide area, though the monastery and the prayer-houses with their culdees and the sick were spared. A portion of the raiders who headed northwards to Mag Ilesen were defeated by Aignert mac Murchada and Muirchertach mac Néill, later King of Ailech, and were forced to flee leaving many dead behind.

Another raid was led by Gofraid in 924, this time sailing to the south of Ireland, taking many hostages. He took them to Rosscarbery, and according to the Annals of Ulster he also sailed to Limerick where he lost a large number of his followers in battle against the son of Ailchi, presumably Tomrair mac Ailchi. Two years later his son Albann led a raiding force north, landing at Linn Duachaill on 4 September. The raiders were attacked by the army of Muirchertach mac Néill, overking of the Northern Uí Néill, at the bridge of Cluain na Cruimther on 28 December and were routed. Albann and a large part of the force was killed, and around half of the army were besieged by the Uí Néill at Athcrathin in County Down for a week, until a force led by Gofraid relieved them.

In 927 Gofraid's kinsman Sitric Cáech, King of Northumbria, died. The Irish annals record the Gofraid left Ireland that year, along with a great many others from Dublin and Linns to claim Sitric's throne. During his absence it seems Gofraid delegated authority to his sons, thus (according to the Annals of Clonmacnoise) drawing the ire of the sons of Sitric. Sitric's sons allied with a "son of Helgi", probably Tomrair mac Ailchi of Limerick or a kinsman, and conquered Dublin, though this success was short-lived as Gofraid returned after only six months abroad. Gofraid's attempt to rule in Northumbria was unsuccessful, and he was driven out by King Æthelstan. The Anglo-Saxon Chronicle makes no mention of Gofraid, simply stating that Æthelstan succeeded Sitric as King in Northumbria, and thereafter held a meeting with the other kings in Britain, establishing peace. A later account by William of Malmesbury tells a different story. In his version, Gofraid goes to "Scotia" following Sitric's death, to attend a meeting at Dacre with Æthelstan, Constantine II of Scotland, and Owen I of Strathclyde. Instead, he and a Viking ally called Thurfrith lead a force to York and besiege the city. Æthelstan turns on the Vikings and Gofraid is captured. The city is looted by the Anglo-Saxons and Gofraid is allowed to return to Ireland under oath. It is not certain how much of William's account is based on truthful historical sources and how much is made up.

Following his return to Dublin, the next mention of Gofraid in contemporary accounts is with regards to raids he led. In 929 he plundered Kildare, and the following year he plundered Dunmore Cave, killing 1000 people in the attack. Expert opinion is divided, but it is believed that Dunmore Cave was perhaps being used as a temporary dwelling place, or perhaps as a place of burial for the native Irish. In 931 Gofraid left Dublin for Mag Raigne in Ossory, where the rival Vikings of Limerick had set up a camp following a failed attack on Connaught the previous year. The annals report that Gofraid's aim was to expel a grandson (or great-grandson) of Ímar from Mag Raigne, perhaps one of the sons of Sitric who had seized Dublin in 927 probably allied with the Limerick-based Tomrair mac Ailchi. Downham suggests that the establishment of the camp at Mag Raigne was an attempt by the Vikings of Limerick to limit the ability of Gofraid and his kin to project their power through Ireland.

Chronicle evidence suggests the conflict between Dublin and Limerick lasted until 937 when Gofraid's son Amlaíb won a victory at Lough Ree where he captured the Limerick king Olaf Scabbyhead and destroyed his ships. Gofraid did not live to see this victory, having died in 934, with Amlaíb succeeding him as king of Dublin. The Annals of Ulster describe him as "a most cruel king of the Norsemen", and say he died of a sickness.

Family
In the annals Gofraid is identified by the use of "ua Ímair", meaning "grandson of Ímar", but never with a patronymic. As such, it is not possible to identify which of the three known sons of Ímar (Bárid, Sichfrith or Sitriuc) - if any - was the father of Gofraid. One possible reason for the lack of a patronym might be that Gofraid was the child of a son of Ímar who never ruled Dublin, or who spent most of his time outside Ireland, thus making Gofraid's legitimacy to rule Dublin dependent on the identity of his grandfather, not his father. Another possibility is that Gofraid was a grandson of Ímar through a daughter, again with his right to rule dependent on his grandfather. Gofraid's kinsmen Ímar, Sitric, Amlaíb and Ragnall are the other known grandsons of Ímar identified by the use of "ua Ímair". All except for Amlaíb ruled as either King of Dublin or King of Northumbria at one time or another.

Four individuals are identifiable as sons of Gofraid. His son Amlaíb succeeded Gofraid as King of Dublin, and eventually reclaimed Northumbria for the Vikings too. Another son, Albann, was killed in battle against Muirchertach mac Néill in 926. Blácaire mac Gofraid, King of Dublin from 940–945, was another son, as was Ragnall mac Gofraid who ruled Northumbria in 943 and 944, probably along with his cousin Amlaíb Cuarán, until they were driven out by Edmund I of England. Later descendants include Cammán mac Amlaíb, son of Gofraid's son Amlaíb, who is recorded as being defeated in battle in 960, and also in 962 if he is identical to the individual recorded as "Sitriuc Cam". Gofraid mac Amlaíb, recorded by the annals as dying in 963, may have been a brother of Cammán, or he may have been a son of Amlaíb Cuarán.